1048 lines
26 KiB
JSON
1048 lines
26 KiB
JSON
{
|
|
"version": "6",
|
|
"dialect": "sqlite",
|
|
"id": "f5bac27e-7f31-4197-a67e-e798fb3cc742",
|
|
"prevId": "b75e0fda-81d4-44e9-a945-1854db90e68c",
|
|
"tables": {
|
|
"ai_locks": {
|
|
"name": "ai_locks",
|
|
"columns": {
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": true,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"locked_at": {
|
|
"name": "locked_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"token": {
|
|
"name": "token",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"expires_at": {
|
|
"name": "expires_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
}
|
|
},
|
|
"indexes": {},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"contexts": {
|
|
"name": "contexts",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"type": {
|
|
"name": "type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"meta": {
|
|
"name": "meta",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"archived_at": {
|
|
"name": "archived_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"is_favorite": {
|
|
"name": "is_favorite",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"purged_at": {
|
|
"name": "purged_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
}
|
|
},
|
|
"indexes": {
|
|
"contexts_updated_at_idx": {
|
|
"name": "contexts_updated_at_idx",
|
|
"columns": [
|
|
"updated_at"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"contexts_user_id_idx": {
|
|
"name": "contexts_user_id_idx",
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"contexts_id_user_id_pk": {
|
|
"columns": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"name": "contexts_id_user_id_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"history_entries": {
|
|
"name": "history_entries",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"topic_id": {
|
|
"name": "topic_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"date": {
|
|
"name": "date",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"text": {
|
|
"name": "text",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"linked_context_id": {
|
|
"name": "linked_context_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"done_at": {
|
|
"name": "done_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"wiedervorlage_date": {
|
|
"name": "wiedervorlage_date",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"wiedervorlage_resolved_at": {
|
|
"name": "wiedervorlage_resolved_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"purged_at": {
|
|
"name": "purged_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
}
|
|
},
|
|
"indexes": {
|
|
"history_entries_updated_at_idx": {
|
|
"name": "history_entries_updated_at_idx",
|
|
"columns": [
|
|
"updated_at"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"history_entries_topic_id_idx": {
|
|
"name": "history_entries_topic_id_idx",
|
|
"columns": [
|
|
"topic_id"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"history_entries_user_id_idx": {
|
|
"name": "history_entries_user_id_idx",
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"history_entries_topic_id_user_id_topics_id_user_id_fk": {
|
|
"name": "history_entries_topic_id_user_id_topics_id_user_id_fk",
|
|
"tableFrom": "history_entries",
|
|
"tableTo": "topics",
|
|
"columnsFrom": [
|
|
"topic_id",
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"history_entries_id_user_id_pk": {
|
|
"columns": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"name": "history_entries_id_user_id_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"image_blobs": {
|
|
"name": "image_blobs",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"mime_type": {
|
|
"name": "mime_type",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"content_hash": {
|
|
"name": "content_hash",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"data": {
|
|
"name": "data",
|
|
"type": "blob",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
}
|
|
},
|
|
"indexes": {
|
|
"image_blobs_user_id_idx": {
|
|
"name": "image_blobs_user_id_idx",
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"image_blobs_content_hash_idx": {
|
|
"name": "image_blobs_content_hash_idx",
|
|
"columns": [
|
|
"content_hash"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"image_blobs_id_user_id_pk": {
|
|
"columns": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"name": "image_blobs_id_user_id_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"notebooks": {
|
|
"name": "notebooks",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"name": {
|
|
"name": "name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"context_id": {
|
|
"name": "context_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"is_private": {
|
|
"name": "is_private",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"is_favorite": {
|
|
"name": "is_favorite",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"purged_at": {
|
|
"name": "purged_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
}
|
|
},
|
|
"indexes": {
|
|
"notebooks_updated_at_idx": {
|
|
"name": "notebooks_updated_at_idx",
|
|
"columns": [
|
|
"updated_at"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"notebooks_user_id_idx": {
|
|
"name": "notebooks_user_id_idx",
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"notebooks_id_user_id_pk": {
|
|
"columns": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"name": "notebooks_id_user_id_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"page_notebooks": {
|
|
"name": "page_notebooks",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"page_id": {
|
|
"name": "page_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"notebook_id": {
|
|
"name": "notebook_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"purged_at": {
|
|
"name": "purged_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
}
|
|
},
|
|
"indexes": {
|
|
"page_notebooks_updated_at_idx": {
|
|
"name": "page_notebooks_updated_at_idx",
|
|
"columns": [
|
|
"updated_at"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"page_notebooks_page_id_idx": {
|
|
"name": "page_notebooks_page_id_idx",
|
|
"columns": [
|
|
"page_id"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"page_notebooks_notebook_id_idx": {
|
|
"name": "page_notebooks_notebook_id_idx",
|
|
"columns": [
|
|
"notebook_id"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"page_notebooks_user_id_idx": {
|
|
"name": "page_notebooks_user_id_idx",
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"page_notebooks_id_user_id_pk": {
|
|
"columns": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"name": "page_notebooks_id_user_id_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"pages": {
|
|
"name": "pages",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"body": {
|
|
"name": "body",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "''"
|
|
},
|
|
"is_private": {
|
|
"name": "is_private",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"purged_at": {
|
|
"name": "purged_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
}
|
|
},
|
|
"indexes": {
|
|
"pages_updated_at_idx": {
|
|
"name": "pages_updated_at_idx",
|
|
"columns": [
|
|
"updated_at"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"pages_user_id_idx": {
|
|
"name": "pages_user_id_idx",
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {},
|
|
"compositePrimaryKeys": {
|
|
"pages_id_user_id_pk": {
|
|
"columns": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"name": "pages_id_user_id_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"ratings": {
|
|
"name": "ratings",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"topic_id": {
|
|
"name": "topic_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"history_entry_id": {
|
|
"name": "history_entry_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"person_name": {
|
|
"name": "person_name",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"value": {
|
|
"name": "value",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"comment": {
|
|
"name": "comment",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"purged_at": {
|
|
"name": "purged_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
}
|
|
},
|
|
"indexes": {
|
|
"ratings_updated_at_idx": {
|
|
"name": "ratings_updated_at_idx",
|
|
"columns": [
|
|
"updated_at"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"ratings_topic_id_idx": {
|
|
"name": "ratings_topic_id_idx",
|
|
"columns": [
|
|
"topic_id"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"ratings_user_id_idx": {
|
|
"name": "ratings_user_id_idx",
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"ratings_topic_id_user_id_topics_id_user_id_fk": {
|
|
"name": "ratings_topic_id_user_id_topics_id_user_id_fk",
|
|
"tableFrom": "ratings",
|
|
"tableTo": "topics",
|
|
"columnsFrom": [
|
|
"topic_id",
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
},
|
|
"ratings_history_entry_id_user_id_history_entries_id_user_id_fk": {
|
|
"name": "ratings_history_entry_id_user_id_history_entries_id_user_id_fk",
|
|
"tableFrom": "ratings",
|
|
"tableTo": "history_entries",
|
|
"columnsFrom": [
|
|
"history_entry_id",
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"ratings_id_user_id_pk": {
|
|
"columns": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"name": "ratings_id_user_id_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
},
|
|
"topics": {
|
|
"name": "topics",
|
|
"columns": {
|
|
"id": {
|
|
"name": "id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"user_id": {
|
|
"name": "user_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"context_id": {
|
|
"name": "context_id",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"title": {
|
|
"name": "title",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"status": {
|
|
"name": "status",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": "'active'"
|
|
},
|
|
"snooze_until": {
|
|
"name": "snooze_until",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"sort_order": {
|
|
"name": "sort_order",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 0
|
|
},
|
|
"is_new": {
|
|
"name": "is_new",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": true
|
|
},
|
|
"updated_at": {
|
|
"name": "updated_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false
|
|
},
|
|
"deleted_at": {
|
|
"name": "deleted_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"purged_at": {
|
|
"name": "purged_at",
|
|
"type": "text",
|
|
"primaryKey": false,
|
|
"notNull": false,
|
|
"autoincrement": false
|
|
},
|
|
"version": {
|
|
"name": "version",
|
|
"type": "integer",
|
|
"primaryKey": false,
|
|
"notNull": true,
|
|
"autoincrement": false,
|
|
"default": 1
|
|
}
|
|
},
|
|
"indexes": {
|
|
"topics_updated_at_idx": {
|
|
"name": "topics_updated_at_idx",
|
|
"columns": [
|
|
"updated_at"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"topics_context_id_idx": {
|
|
"name": "topics_context_id_idx",
|
|
"columns": [
|
|
"context_id"
|
|
],
|
|
"isUnique": false
|
|
},
|
|
"topics_user_id_idx": {
|
|
"name": "topics_user_id_idx",
|
|
"columns": [
|
|
"user_id"
|
|
],
|
|
"isUnique": false
|
|
}
|
|
},
|
|
"foreignKeys": {
|
|
"topics_context_id_user_id_contexts_id_user_id_fk": {
|
|
"name": "topics_context_id_user_id_contexts_id_user_id_fk",
|
|
"tableFrom": "topics",
|
|
"tableTo": "contexts",
|
|
"columnsFrom": [
|
|
"context_id",
|
|
"user_id"
|
|
],
|
|
"columnsTo": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"onDelete": "no action",
|
|
"onUpdate": "no action"
|
|
}
|
|
},
|
|
"compositePrimaryKeys": {
|
|
"topics_id_user_id_pk": {
|
|
"columns": [
|
|
"id",
|
|
"user_id"
|
|
],
|
|
"name": "topics_id_user_id_pk"
|
|
}
|
|
},
|
|
"uniqueConstraints": {},
|
|
"checkConstraints": {}
|
|
}
|
|
},
|
|
"views": {},
|
|
"enums": {},
|
|
"_meta": {
|
|
"schemas": {},
|
|
"tables": {},
|
|
"columns": {}
|
|
},
|
|
"internal": {
|
|
"indexes": {}
|
|
}
|
|
} |