110 lines
2.7 KiB
JSON
110 lines
2.7 KiB
JSON
{
|
|||
|
|
"id": "0002_document_revisions",
|
||
|
|
"prevId": "0001_document_chunks",
|
||
|
|
"version": "7",
|
||
|
|
"dialect": "postgresql",
|
||
|
|
"tables": {
|
||
|
|
"document_revisions": {
|
||
|
|
"name": "document_revisions",
|
||
|
|
"columns": {
|
||
|
|
"id": {
|
||
|
|
"name": "id",
|
||
|
|
"type": "uuid",
|
||
|
|
"primaryKey": true,
|
||
|
|
"notNull": true,
|
||
|
|
"default": "gen_random_uuid()"
|
||
|
|
},
|
||
|
|
"document_id": {
|
||
|
|
"name": "document_id",
|
||
|
|
"type": "text",
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"slug": {
|
||
|
|
"name": "slug",
|
||
|
|
"type": "text",
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"revision_no": {
|
||
|
|
"name": "revision_no",
|
||
|
|
"type": "integer",
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"title": {
|
||
|
|
"name": "title",
|
||
|
|
"type": "text",
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"body": {
|
||
|
|
"name": "body",
|
||
|
|
"type": "text",
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"meta": {
|
||
|
|
"name": "meta",
|
||
|
|
"type": "jsonb",
|
||
|
|
"notNull": true
|
||
|
|
},
|
||
|
|
"reason": {
|
||
|
|
"name": "reason",
|
||
|
|
"type": "text",
|
||
|
|
"notNull": true,
|
||
|
|
"default": "'index'"
|
||
|
|
},
|
||
|
|
"created_at": {
|
||
|
|
"name": "created_at",
|
||
|
|
"type": "timestamp",
|
||
|
|
"notNull": true,
|
||
|
|
"default": "now()"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"indexes": {
|
||
|
|
"document_revisions_document_id_idx": {
|
||
|
|
"name": "document_revisions_document_id_idx",
|
||
|
|
"columns": [
|
||
|
|
{ "name": "document_id", "asc": true }
|
||
|
|
],
|
||
|
|
"isUnique": false
|
||
|
|
},
|
||
|
|
"document_revisions_slug_idx": {
|
||
|
|
"name": "document_revisions_slug_idx",
|
||
|
|
"columns": [
|
||
|
|
{ "name": "slug", "asc": true }
|
||
|
|
],
|
||
|
|
"isUnique": false
|
||
|
|
},
|
||
|
|
"document_revisions_doc_rev_idx": {
|
||
|
|
"name": "document_revisions_doc_rev_idx",
|
||
|
|
"columns": [
|
||
|
|
{ "name": "document_id", "asc": true },
|
||
|
|
{ "name": "revision_no", "asc": false }
|
||
|
|
],
|
||
|
|
"isUnique": false
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"foreignKeys": {
|
||
|
|
"document_revisions_document_id_documents_id_fk": {
|
||
|
|
"name": "document_revisions_document_id_documents_id_fk",
|
||
|
|
"columns": ["document_id"],
|
||
|
|
"referenceTable": "documents",
|
||
|
|
"referenceColumns": ["id"],
|
||
|
|
"onDelete": "cascade"
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"compositePrimaryKeys": {},
|
||
|
|
"uniqueConstraints": {},
|
||
|
|
"policies": {}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
"enums": {},
|
||
|
|
"schemas": {},
|
||
|
|
"sequences": {},
|
||
|
|
"roles": {},
|
||
|
|
"policies": {},
|
||
|
|
"views": {},
|
||
|
|
"extensions": {},
|
||
|
|
"_meta": {
|
||
|
|
"columns": {},
|
||
|
|
"schemas": {},
|
||
|
|
"tables": {}
|
||
|
|
}
|
||
|
|
}
|