diff options
author | E99p1ant <i@github.red> | 2022-06-05 13:34:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-05 13:34:21 +0800 |
commit | a328e7ccc4f94e19cddfe5894636228663f5c7fa (patch) | |
tree | 34d827770f004a40eb8dc1feb44109e63452d5a0 /docs/dev | |
parent | 155cae1de8916fc3fde78f350763034b7422caee (diff) |
access_token: encrypt access token with SHA256 (#7008)
* access_token: encrypt access token with SHA256
* revert list access token
* fix lint
* generate schemadoc
* add database migrations
* fix tests
* fix tests
* add test case for access token golden
* fix test in postgres
* `Sha256` -> `SHA256`
* Use GORM for migration
* task generate-schemadoc
* Use unique
* change migration name
* allow read
* task generate-schemadoc
* add changelog
* fix lint error
* update changelog
* remove Debug
* add comments
Co-authored-by: Joe Chen <jc@unknwon.io>
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/database_schema.md | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/docs/dev/database_schema.md b/docs/dev/database_schema.md index bce1120b..82070f7e 100644 --- a/docs/dev/database_schema.md +++ b/docs/dev/database_schema.md @@ -14,14 +14,15 @@ 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 - Sha1 | sha1 | VARCHAR(40) UNIQUE | VARCHAR(40) UNIQUE | VARCHAR(40) UNIQUE - CreatedUnix | created_unix | BIGINT | BIGINT | INTEGER - UpdatedUnix | updated_unix | BIGINT | BIGINT | INTEGER + FIELD | COLUMN | POSTGRESQL | MYSQL | SQLITE3 +--------------+--------------+-----------------------------+-----------------------------+------------------------------ + ID | id | BIGSERIAL | BIGINT AUTO_INCREMENT | INTEGER + UserID | uid | BIGINT | BIGINT | INTEGER + Name | name | TEXT | LONGTEXT | TEXT + Sha1 | sha1 | VARCHAR(40) UNIQUE | VARCHAR(40) UNIQUE | VARCHAR(40) UNIQUE + SHA256 | sha256 | VARCHAR(64) NOT NULL UNIQUE | VARCHAR(64) NOT NULL UNIQUE | VARCHAR(64) NOT NULL UNIQUE + CreatedUnix | created_unix | BIGINT | BIGINT | INTEGER + UpdatedUnix | updated_unix | BIGINT | BIGINT | INTEGER Primary keys: id ``` |