-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev,doc: Also document migration structure
- Loading branch information
Showing
3 changed files
with
56 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
```sql | ||
Table "db.migration" | ||
Column | Type | Collation | Nullable | Default | ||
-------------------+--------------------------+-----------+----------+------------------------------------------ | ||
id | integer | | not null | nextval('db.migration_id_seq'::regclass) | ||
major_version | text | | not null | | ||
minor_version | text | | | | ||
filename | text | | not null | | ||
sha256_hash | text | | not null | | ||
applied_at | timestamp with time zone | | not null | now() | ||
duration_ms | integer | | not null | | ||
major_description | text | | not null | | ||
minor_description | text | | | | ||
Indexes: | ||
"migration_pkey" PRIMARY KEY, btree (id) | ||
"migration_major_version_idx" btree (major_version) | ||
"migration_minor_version_idx" btree (minor_version) | ||
"migration_sha256_hash_idx" btree (sha256_hash) | ||
Check constraints: | ||
"major and minor consistency" CHECK (minor_version IS NULL AND minor_description IS NULL OR minor_version IS NOT NULL AND minor_description IS NOT NULL) | ||
Policies: | ||
POLICY "migration_authenticated_read" FOR SELECT | ||
TO authenticated | ||
USING (true) | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
```sql | ||
Table "db.migration" | ||
Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description | ||
-------------------+--------------------------+-----------+----------+------------------------------------------+----------+-------------+--------------+------------- | ||
id | integer | | not null | nextval('db.migration_id_seq'::regclass) | plain | | | | ||
major_version | text | | not null | | extended | | | | ||
minor_version | text | | | | extended | | | | ||
filename | text | | not null | | extended | | | | ||
sha256_hash | text | | not null | | extended | | | | ||
applied_at | timestamp with time zone | | not null | now() | plain | | | | ||
duration_ms | integer | | not null | | plain | | | | ||
major_description | text | | not null | | extended | | | | ||
minor_description | text | | | | extended | | | | ||
Indexes: | ||
"migration_pkey" PRIMARY KEY, btree (id) | ||
"migration_major_version_idx" btree (major_version) | ||
"migration_minor_version_idx" btree (minor_version) | ||
"migration_sha256_hash_idx" btree (sha256_hash) | ||
Check constraints: | ||
"major and minor consistency" CHECK (minor_version IS NULL AND minor_description IS NULL OR minor_version IS NOT NULL AND minor_description IS NOT NULL) | ||
Policies: | ||
POLICY "migration_authenticated_read" FOR SELECT | ||
TO authenticated | ||
USING (true) | ||
Access method: heap | ||
|
||
``` |