diff options
author | ᴜɴᴋɴᴡᴏɴ <u@gogs.io> | 2020-10-06 15:43:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-06 15:43:28 +0800 |
commit | 2eaf1d693ae08c0312dd1f977f81675f418f3770 (patch) | |
tree | b42a26180e813918a05a676bd18e13a3a1bb73ec /docs/dev | |
parent | a92d818aa35583594a6b3098f4e1e1f4edec17dd (diff) |
db: migrate access table to use GORM (#6371)
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/database_schema.md | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/docs/dev/database_schema.md b/docs/dev/database_schema.md index 39e1be77..bce1120b 100644 --- a/docs/dev/database_schema.md +++ b/docs/dev/database_schema.md @@ -1,8 +1,21 @@ +# Table "access" + +``` + FIELD | COLUMN | POSTGRESQL | MYSQL | SQLITE3 +---------+---------+-----------------+-----------------------+------------------- + ID | id | BIGSERIAL | BIGINT AUTO_INCREMENT | INTEGER + UserID | user_id | BIGINT NOT NULL | BIGINT NOT NULL | INTEGER NOT NULL + RepoID | repo_id | BIGINT NOT NULL | BIGINT NOT NULL | INTEGER NOT NULL + Mode | mode | BIGINT NOT NULL | BIGINT NOT NULL | INTEGER NOT NULL + +Primary keys: id +``` + # Table "access_token" ``` FIELD | COLUMN | POSTGRESQL | MYSQL | SQLITE3 -+-------------+--------------+--------------------+-----------------------+--------------------+ +--------------+--------------+--------------------+-----------------------+--------------------- ID | id | BIGSERIAL | BIGINT AUTO_INCREMENT | INTEGER UserID | uid | BIGINT | BIGINT | INTEGER Name | name | TEXT | LONGTEXT | TEXT @@ -17,7 +30,7 @@ Primary keys: id ``` FIELD | COLUMN | POSTGRESQL | MYSQL | SQLITE3 -+-----------+------------+----------------------+----------------------+-------------------+ +------------+------------+----------------------+----------------------+-------------------- RepoID | repo_id | BIGINT | BIGINT | INTEGER OID | oid | TEXT | VARCHAR(191) | TEXT Size | size | BIGINT NOT NULL | BIGINT NOT NULL | INTEGER NOT NULL @@ -31,13 +44,13 @@ Primary keys: repo_id, oid ``` FIELD | COLUMN | POSTGRESQL | MYSQL | SQLITE3 -+-------------+--------------+------------------+-----------------------+------------------+ +--------------+--------------+------------------+-----------------------+------------------- ID | id | BIGSERIAL | BIGINT AUTO_INCREMENT | INTEGER Type | type | BIGINT | BIGINT | INTEGER Name | name | TEXT UNIQUE | VARCHAR(191) UNIQUE | TEXT UNIQUE IsActived | is_actived | BOOLEAN NOT NULL | BOOLEAN NOT NULL | NUMERIC NOT NULL IsDefault | is_default | BOOLEAN | BOOLEAN | NUMERIC - RawConfig | cfg | TEXT | TEXT | TEXT + Config | cfg | TEXT | TEXT | TEXT CreatedUnix | created_unix | BIGINT | BIGINT | INTEGER UpdatedUnix | updated_unix | BIGINT | BIGINT | INTEGER |