{ "version": "6", "dialect": "sqlite", "id": "67b15688-d97d-4c9b-8f75-8b843824f931", "prevId": "905c1022-3a18-4e4e-b1d7-0811d4de2596", "tables": { "blobs": { "name": "blobs", "columns": { "blob_id": { "name": "blob_id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "blob_key": { "name": "blob_key", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "size": { "name": "size", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "r2_etag": { "name": "r2_etag", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "sha256": { "name": "sha256", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "refcount": { "name": "refcount", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 0 }, "created_at_ms": { "name": "created_at_ms", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": { "blobs_key_unique": { "name": "blobs_key_unique", "columns": [ "blob_key" ], "isUnique": true }, "blobs_refcount_idx": { "name": "blobs_refcount_idx", "columns": [ "refcount" ], "isUnique": false }, "blobs_created_idx": { "name": "blobs_created_idx", "columns": [ "created_at_ms" ], "isUnique": false } }, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "changes": { "name": "changes", "columns": { "seq": { "name": "seq", "type": "integer", "primaryKey": true, "notNull": true, "autoincrement": true }, "node_id": { "name": "node_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "href": { "name": "href", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "change_type": { "name": "change_type", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "changed_at_ms": { "name": "changed_at_ms", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": { "changes_href_idx": { "name": "changes_href_idx", "columns": [ "href" ], "isUnique": false }, "changes_changed_idx": { "name": "changes_changed_idx", "columns": [ "changed_at_ms" ], "isUnique": false } }, "foreignKeys": { "changes_node_id_nodes_id_fk": { "name": "changes_node_id_nodes_id_fk", "tableFrom": "changes", "tableTo": "nodes", "columnsFrom": [ "node_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": { "changes_type_check": { "name": "changes_type_check", "value": "\"changes\".\"change_type\" in ('created', 'updated', 'deleted', 'moved')" } } }, "dead_props": { "name": "dead_props", "columns": { "node_id": { "name": "node_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "ns_uri": { "name": "ns_uri", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "local_name": { "name": "local_name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "xml_value": { "name": "xml_value", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": { "dead_props_node_id_nodes_id_fk": { "name": "dead_props_node_id_nodes_id_fk", "tableFrom": "dead_props", "tableTo": "nodes", "columnsFrom": [ "node_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": { "dead_props_node_id_ns_uri_local_name_pk": { "columns": [ "node_id", "ns_uri", "local_name" ], "name": "dead_props_node_id_ns_uri_local_name_pk" } }, "uniqueConstraints": {}, "checkConstraints": {} }, "meta": { "name": "meta", "columns": { "key": { "name": "key", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "value": { "name": "value", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": {}, "foreignKeys": {}, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": {} }, "locks": { "name": "locks", "columns": { "token": { "name": "token", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "root_node_id": { "name": "root_node_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "root_path": { "name": "root_path", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "owner_xml": { "name": "owner_xml", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "principal_subject_id": { "name": "principal_subject_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "scope": { "name": "scope", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "depth": { "name": "depth", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at_ms": { "name": "created_at_ms", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "expires_at_ms": { "name": "expires_at_ms", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": { "locks_root_node_idx": { "name": "locks_root_node_idx", "columns": [ "root_node_id" ], "isUnique": false }, "locks_root_path_idx": { "name": "locks_root_path_idx", "columns": [ "root_path" ], "isUnique": false }, "locks_expires_idx": { "name": "locks_expires_idx", "columns": [ "expires_at_ms" ], "isUnique": false }, "locks_principal_idx": { "name": "locks_principal_idx", "columns": [ "principal_subject_id" ], "isUnique": false } }, "foreignKeys": { "locks_root_node_id_nodes_id_fk": { "name": "locks_root_node_id_nodes_id_fk", "tableFrom": "locks", "tableTo": "nodes", "columnsFrom": [ "root_node_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": { "locks_scope_check": { "name": "locks_scope_check", "value": "\"locks\".\"scope\" in ('exclusive', 'shared')" }, "locks_depth_check": { "name": "locks_depth_check", "value": "\"locks\".\"depth\" in ('0', 'infinity')" } } }, "nodes": { "name": "nodes", "columns": { "id": { "name": "id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "parent_id": { "name": "parent_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "name": { "name": "name", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "kind": { "name": "kind", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "blob_id": { "name": "blob_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "size": { "name": "size", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 0 }, "content_type": { "name": "content_type", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "content_language": { "name": "content_language", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "etag": { "name": "etag", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "root_marker": { "name": "root_marker", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "created_at_ms": { "name": "created_at_ms", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "modified_at_ms": { "name": "modified_at_ms", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "version": { "name": "version", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false, "default": 1 } }, "indexes": { "nodes_parent_name_unique": { "name": "nodes_parent_name_unique", "columns": [ "parent_id", "name" ], "isUnique": true }, "nodes_root_marker_unique": { "name": "nodes_root_marker_unique", "columns": [ "root_marker" ], "isUnique": true }, "nodes_parent_kind_idx": { "name": "nodes_parent_kind_idx", "columns": [ "parent_id", "kind" ], "isUnique": false }, "nodes_blob_idx": { "name": "nodes_blob_idx", "columns": [ "blob_id" ], "isUnique": false }, "nodes_modified_idx": { "name": "nodes_modified_idx", "columns": [ "modified_at_ms" ], "isUnique": false } }, "foreignKeys": { "nodes_parent_id_nodes_id_fk": { "name": "nodes_parent_id_nodes_id_fk", "tableFrom": "nodes", "tableTo": "nodes", "columnsFrom": [ "parent_id" ], "columnsTo": [ "id" ], "onDelete": "cascade", "onUpdate": "no action" }, "nodes_blob_id_blobs_blob_id_fk": { "name": "nodes_blob_id_blobs_blob_id_fk", "tableFrom": "nodes", "tableTo": "blobs", "columnsFrom": [ "blob_id" ], "columnsTo": [ "blob_id" ], "onDelete": "restrict", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": { "nodes_kind_check": { "name": "nodes_kind_check", "value": "\"nodes\".\"kind\" in ('collection', 'file')" }, "nodes_root_marker_check": { "name": "nodes_root_marker_check", "value": "\"nodes\".\"root_marker\" is null or \"nodes\".\"root_marker\" = 'root'" }, "nodes_collection_blob_check": { "name": "nodes_collection_blob_check", "value": "\"nodes\".\"kind\" != 'collection' or \"nodes\".\"blob_id\" is null" } } }, "pending_uploads": { "name": "pending_uploads", "columns": { "upload_id": { "name": "upload_id", "type": "text", "primaryKey": true, "notNull": true, "autoincrement": false }, "node_id": { "name": "node_id", "type": "text", "primaryKey": false, "notNull": false, "autoincrement": false }, "path": { "name": "path", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "blob_id": { "name": "blob_id", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "blob_key": { "name": "blob_key", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false }, "created_at_ms": { "name": "created_at_ms", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "expires_at_ms": { "name": "expires_at_ms", "type": "integer", "primaryKey": false, "notNull": true, "autoincrement": false }, "state": { "name": "state", "type": "text", "primaryKey": false, "notNull": true, "autoincrement": false } }, "indexes": { "pending_uploads_state_expires_idx": { "name": "pending_uploads_state_expires_idx", "columns": [ "state", "expires_at_ms" ], "isUnique": false }, "pending_uploads_path_idx": { "name": "pending_uploads_path_idx", "columns": [ "path" ], "isUnique": false }, "pending_uploads_blob_idx": { "name": "pending_uploads_blob_idx", "columns": [ "blob_id" ], "isUnique": false } }, "foreignKeys": { "pending_uploads_node_id_nodes_id_fk": { "name": "pending_uploads_node_id_nodes_id_fk", "tableFrom": "pending_uploads", "tableTo": "nodes", "columnsFrom": [ "node_id" ], "columnsTo": [ "id" ], "onDelete": "set null", "onUpdate": "no action" } }, "compositePrimaryKeys": {}, "uniqueConstraints": {}, "checkConstraints": { "pending_uploads_state_check": { "name": "pending_uploads_state_check", "value": "\"pending_uploads\".\"state\" in ('pending', 'committed', 'aborted')" } } } }, "views": {}, "enums": {}, "_meta": { "schemas": {}, "tables": {}, "columns": {} }, "internal": { "indexes": {} } }