{ "id": "38578f9c-c990-4dfc-8e4d-8807680aec9c", "prevId": "4f6d3c6b-2b42-4245-8dc3-f2017c924cc2", "version": "7", "dialect": "postgresql", "tables": { "public.annotation_replies": { "name": "annotation_replies", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "annotation_id": { "name": "annotation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "user_name": { "name": "user_name", "type": "text", "primaryKey": false, "notNull": true }, "message": { "name": "message", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "annotation_replies_annotation_idx": { "name": "annotation_replies_annotation_idx", "columns": [ { "expression": "annotation_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "annotation_replies_annotation_id_annotations_id_fk": { "name": "annotation_replies_annotation_id_annotations_id_fk", "tableFrom": "annotation_replies", "tableTo": "annotations", "columnsFrom": [ "annotation_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.annotation_versions": { "name": "annotation_versions", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "annotation_id": { "name": "annotation_id", "type": "uuid", "primaryKey": false, "notNull": true }, "file_id": { "name": "file_id", "type": "uuid", "primaryKey": false, "notNull": true }, "page_index": { "name": "page_index", "type": "integer", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "user_name": { "name": "user_name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "annotation_type", "typeSchema": "public", "primaryKey": false, "notNull": true }, "data": { "name": "data", "type": "jsonb", "primaryKey": false, "notNull": true }, "kind": { "name": "kind", "type": "text", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "annotation_versions_file_idx": { "name": "annotation_versions_file_idx", "columns": [ { "expression": "file_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "annotation_versions_file_id_files_id_fk": { "name": "annotation_versions_file_id_files_id_fk", "tableFrom": "annotation_versions", "tableTo": "files", "columnsFrom": [ "file_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.annotations": { "name": "annotations", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "file_id": { "name": "file_id", "type": "uuid", "primaryKey": false, "notNull": true }, "page_index": { "name": "page_index", "type": "integer", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "user_name": { "name": "user_name", "type": "text", "primaryKey": false, "notNull": true }, "type": { "name": "type", "type": "annotation_type", "typeSchema": "public", "primaryKey": false, "notNull": true }, "data": { "name": "data", "type": "jsonb", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "updated_at": { "name": "updated_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" }, "resolved": { "name": "resolved", "type": "boolean", "primaryKey": false, "notNull": true, "default": false }, "resolved_at": { "name": "resolved_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": false } }, "indexes": { "annotations_file_page_idx": { "name": "annotations_file_page_idx", "columns": [ { "expression": "file_id", "isExpression": false, "asc": true, "nulls": "last" }, { "expression": "page_index", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": { "annotations_file_id_files_id_fk": { "name": "annotations_file_id_files_id_fk", "tableFrom": "annotations", "tableTo": "files", "columnsFrom": [ "file_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.bookmarks": { "name": "bookmarks", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "file_id": { "name": "file_id", "type": "uuid", "primaryKey": false, "notNull": true }, "page_index": { "name": "page_index", "type": "integer", "primaryKey": false, "notNull": true }, "user_id": { "name": "user_id", "type": "text", "primaryKey": false, "notNull": true }, "user_name": { "name": "user_name", "type": "text", "primaryKey": false, "notNull": true, "default": "''" }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": true }, "parent_id": { "name": "parent_id", "type": "uuid", "primaryKey": false, "notNull": false }, "note": { "name": "note", "type": "text", "primaryKey": false, "notNull": false }, "y_offset": { "name": "y_offset", "type": "double precision", "primaryKey": false, "notNull": true }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": {}, "foreignKeys": { "bookmarks_file_id_files_id_fk": { "name": "bookmarks_file_id_files_id_fk", "tableFrom": "bookmarks", "tableTo": "files", "columnsFrom": [ "file_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false }, "public.files": { "name": "files", "schema": "", "columns": { "id": { "name": "id", "type": "uuid", "primaryKey": true, "notNull": true, "default": "gen_random_uuid()" }, "title": { "name": "title", "type": "text", "primaryKey": false, "notNull": true }, "description": { "name": "description", "type": "text", "primaryKey": false, "notNull": false }, "pdf_url": { "name": "pdf_url", "type": "text", "primaryKey": false, "notNull": true }, "external_id": { "name": "external_id", "type": "text", "primaryKey": false, "notNull": false }, "type_id": { "name": "type_id", "type": "text", "primaryKey": false, "notNull": false }, "type_name": { "name": "type_name", "type": "text", "primaryKey": false, "notNull": false }, "created_at": { "name": "created_at", "type": "timestamp with time zone", "primaryKey": false, "notNull": true, "default": "now()" } }, "indexes": { "files_type_id_idx": { "name": "files_type_id_idx", "columns": [ { "expression": "type_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": false, "concurrently": false, "method": "btree", "with": {} }, "files_external_id_key": { "name": "files_external_id_key", "columns": [ { "expression": "external_id", "isExpression": false, "asc": true, "nulls": "last" } ], "isUnique": true, "concurrently": false, "method": "btree", "with": {} } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "policies": {}, "checkConstraints": {}, "isRLSEnabled": false } }, "enums": { "public.annotation_type": { "name": "annotation_type", "schema": "public", "values": [ "HIGHLIGHT", "DRAW", "COMMENT", "SHAPE", "REDACTION", "TEXTBOX", "STAMP" ] } }, "schemas": {}, "sequences": {}, "roles": {}, "policies": {}, "views": {}, "_meta": { "columns": {}, "schemas": {}, "tables": {} } }