File
Blob: drizzle/file-dav-do/meta/0001_snapshot.json
| 1 | { |
| 2 | "version": "6", |
| 3 | "dialect": "sqlite", |
| 4 | "id": "67b15688-d97d-4c9b-8f75-8b843824f931", |
| 5 | "prevId": "905c1022-3a18-4e4e-b1d7-0811d4de2596", |
| 6 | "tables": { |
| 7 | "blobs": { |
| 8 | "name": "blobs", |
| 9 | "columns": { |
| 10 | "blob_id": { |
| 11 | "name": "blob_id", |
| 12 | "type": "text", |
| 13 | "primaryKey": true, |
| 14 | "notNull": true, |
| 15 | "autoincrement": false |
| 16 | }, |
| 17 | "blob_key": { |
| 18 | "name": "blob_key", |
| 19 | "type": "text", |
| 20 | "primaryKey": false, |
| 21 | "notNull": true, |
| 22 | "autoincrement": false |
| 23 | }, |
| 24 | "size": { |
| 25 | "name": "size", |
| 26 | "type": "integer", |
| 27 | "primaryKey": false, |
| 28 | "notNull": true, |
| 29 | "autoincrement": false |
| 30 | }, |
| 31 | "r2_etag": { |
| 32 | "name": "r2_etag", |
| 33 | "type": "text", |
| 34 | "primaryKey": false, |
| 35 | "notNull": false, |
| 36 | "autoincrement": false |
| 37 | }, |
| 38 | "sha256": { |
| 39 | "name": "sha256", |
| 40 | "type": "text", |
| 41 | "primaryKey": false, |
| 42 | "notNull": false, |
| 43 | "autoincrement": false |
| 44 | }, |
| 45 | "refcount": { |
| 46 | "name": "refcount", |
| 47 | "type": "integer", |
| 48 | "primaryKey": false, |
| 49 | "notNull": true, |
| 50 | "autoincrement": false, |
| 51 | "default": 0 |
| 52 | }, |
| 53 | "created_at_ms": { |
| 54 | "name": "created_at_ms", |
| 55 | "type": "integer", |
| 56 | "primaryKey": false, |
| 57 | "notNull": true, |
| 58 | "autoincrement": false |
| 59 | } |
| 60 | }, |
| 61 | "indexes": { |
| 62 | "blobs_key_unique": { |
| 63 | "name": "blobs_key_unique", |
| 64 | "columns": [ |
| 65 | "blob_key" |
| 66 | ], |
| 67 | "isUnique": true |
| 68 | }, |
| 69 | "blobs_refcount_idx": { |
| 70 | "name": "blobs_refcount_idx", |
| 71 | "columns": [ |
| 72 | "refcount" |
| 73 | ], |
| 74 | "isUnique": false |
| 75 | }, |
| 76 | "blobs_created_idx": { |
| 77 | "name": "blobs_created_idx", |
| 78 | "columns": [ |
| 79 | "created_at_ms" |
| 80 | ], |
| 81 | "isUnique": false |
| 82 | } |
| 83 | }, |
| 84 | "foreignKeys": {}, |
| 85 | "compositePrimaryKeys": {}, |
| 86 | "uniqueConstraints": {}, |
| 87 | "checkConstraints": {} |
| 88 | }, |
| 89 | "changes": { |
| 90 | "name": "changes", |
| 91 | "columns": { |
| 92 | "seq": { |
| 93 | "name": "seq", |
| 94 | "type": "integer", |
| 95 | "primaryKey": true, |
| 96 | "notNull": true, |
| 97 | "autoincrement": true |
| 98 | }, |
| 99 | "node_id": { |
| 100 | "name": "node_id", |
| 101 | "type": "text", |
| 102 | "primaryKey": false, |
| 103 | "notNull": false, |
| 104 | "autoincrement": false |
| 105 | }, |
| 106 | "href": { |
| 107 | "name": "href", |
| 108 | "type": "text", |
| 109 | "primaryKey": false, |
| 110 | "notNull": true, |
| 111 | "autoincrement": false |
| 112 | }, |
| 113 | "change_type": { |
| 114 | "name": "change_type", |
| 115 | "type": "text", |
| 116 | "primaryKey": false, |
| 117 | "notNull": true, |
| 118 | "autoincrement": false |
| 119 | }, |
| 120 | "changed_at_ms": { |
| 121 | "name": "changed_at_ms", |
| 122 | "type": "integer", |
| 123 | "primaryKey": false, |
| 124 | "notNull": true, |
| 125 | "autoincrement": false |
| 126 | } |
| 127 | }, |
| 128 | "indexes": { |
| 129 | "changes_href_idx": { |
| 130 | "name": "changes_href_idx", |
| 131 | "columns": [ |
| 132 | "href" |
| 133 | ], |
| 134 | "isUnique": false |
| 135 | }, |
| 136 | "changes_changed_idx": { |
| 137 | "name": "changes_changed_idx", |
| 138 | "columns": [ |
| 139 | "changed_at_ms" |
| 140 | ], |
| 141 | "isUnique": false |
| 142 | } |
| 143 | }, |
| 144 | "foreignKeys": { |
| 145 | "changes_node_id_nodes_id_fk": { |
| 146 | "name": "changes_node_id_nodes_id_fk", |
| 147 | "tableFrom": "changes", |
| 148 | "tableTo": "nodes", |
| 149 | "columnsFrom": [ |
| 150 | "node_id" |
| 151 | ], |
| 152 | "columnsTo": [ |
| 153 | "id" |
| 154 | ], |
| 155 | "onDelete": "set null", |
| 156 | "onUpdate": "no action" |
| 157 | } |
| 158 | }, |
| 159 | "compositePrimaryKeys": {}, |
| 160 | "uniqueConstraints": {}, |
| 161 | "checkConstraints": { |
| 162 | "changes_type_check": { |
| 163 | "name": "changes_type_check", |
| 164 | "value": "\"changes\".\"change_type\" in ('created', 'updated', 'deleted', 'moved')" |
| 165 | } |
| 166 | } |
| 167 | }, |
| 168 | "dead_props": { |
| 169 | "name": "dead_props", |
| 170 | "columns": { |
| 171 | "node_id": { |
| 172 | "name": "node_id", |
| 173 | "type": "text", |
| 174 | "primaryKey": false, |
| 175 | "notNull": true, |
| 176 | "autoincrement": false |
| 177 | }, |
| 178 | "ns_uri": { |
| 179 | "name": "ns_uri", |
| 180 | "type": "text", |
| 181 | "primaryKey": false, |
| 182 | "notNull": true, |
| 183 | "autoincrement": false |
| 184 | }, |
| 185 | "local_name": { |
| 186 | "name": "local_name", |
| 187 | "type": "text", |
| 188 | "primaryKey": false, |
| 189 | "notNull": true, |
| 190 | "autoincrement": false |
| 191 | }, |
| 192 | "xml_value": { |
| 193 | "name": "xml_value", |
| 194 | "type": "text", |
| 195 | "primaryKey": false, |
| 196 | "notNull": true, |
| 197 | "autoincrement": false |
| 198 | } |
| 199 | }, |
| 200 | "indexes": {}, |
| 201 | "foreignKeys": { |
| 202 | "dead_props_node_id_nodes_id_fk": { |
| 203 | "name": "dead_props_node_id_nodes_id_fk", |
| 204 | "tableFrom": "dead_props", |
| 205 | "tableTo": "nodes", |
| 206 | "columnsFrom": [ |
| 207 | "node_id" |
| 208 | ], |
| 209 | "columnsTo": [ |
| 210 | "id" |
| 211 | ], |
| 212 | "onDelete": "cascade", |
| 213 | "onUpdate": "no action" |
| 214 | } |
| 215 | }, |
| 216 | "compositePrimaryKeys": { |
| 217 | "dead_props_node_id_ns_uri_local_name_pk": { |
| 218 | "columns": [ |
| 219 | "node_id", |
| 220 | "ns_uri", |
| 221 | "local_name" |
| 222 | ], |
| 223 | "name": "dead_props_node_id_ns_uri_local_name_pk" |
| 224 | } |
| 225 | }, |
| 226 | "uniqueConstraints": {}, |
| 227 | "checkConstraints": {} |
| 228 | }, |
| 229 | "meta": { |
| 230 | "name": "meta", |
| 231 | "columns": { |
| 232 | "key": { |
| 233 | "name": "key", |
| 234 | "type": "text", |
| 235 | "primaryKey": true, |
| 236 | "notNull": true, |
| 237 | "autoincrement": false |
| 238 | }, |
| 239 | "value": { |
| 240 | "name": "value", |
| 241 | "type": "text", |
| 242 | "primaryKey": false, |
| 243 | "notNull": true, |
| 244 | "autoincrement": false |
| 245 | } |
| 246 | }, |
| 247 | "indexes": {}, |
| 248 | "foreignKeys": {}, |
| 249 | "compositePrimaryKeys": {}, |
| 250 | "uniqueConstraints": {}, |
| 251 | "checkConstraints": {} |
| 252 | }, |
| 253 | "locks": { |
| 254 | "name": "locks", |
| 255 | "columns": { |
| 256 | "token": { |
| 257 | "name": "token", |
| 258 | "type": "text", |
| 259 | "primaryKey": true, |
| 260 | "notNull": true, |
| 261 | "autoincrement": false |
| 262 | }, |
| 263 | "root_node_id": { |
| 264 | "name": "root_node_id", |
| 265 | "type": "text", |
| 266 | "primaryKey": false, |
| 267 | "notNull": false, |
| 268 | "autoincrement": false |
| 269 | }, |
| 270 | "root_path": { |
| 271 | "name": "root_path", |
| 272 | "type": "text", |
| 273 | "primaryKey": false, |
| 274 | "notNull": true, |
| 275 | "autoincrement": false |
| 276 | }, |
| 277 | "owner_xml": { |
| 278 | "name": "owner_xml", |
| 279 | "type": "text", |
| 280 | "primaryKey": false, |
| 281 | "notNull": true, |
| 282 | "autoincrement": false |
| 283 | }, |
| 284 | "principal_subject_id": { |
| 285 | "name": "principal_subject_id", |
| 286 | "type": "text", |
| 287 | "primaryKey": false, |
| 288 | "notNull": true, |
| 289 | "autoincrement": false |
| 290 | }, |
| 291 | "scope": { |
| 292 | "name": "scope", |
| 293 | "type": "text", |
| 294 | "primaryKey": false, |
| 295 | "notNull": true, |
| 296 | "autoincrement": false |
| 297 | }, |
| 298 | "depth": { |
| 299 | "name": "depth", |
| 300 | "type": "text", |
| 301 | "primaryKey": false, |
| 302 | "notNull": true, |
| 303 | "autoincrement": false |
| 304 | }, |
| 305 | "created_at_ms": { |
| 306 | "name": "created_at_ms", |
| 307 | "type": "integer", |
| 308 | "primaryKey": false, |
| 309 | "notNull": true, |
| 310 | "autoincrement": false |
| 311 | }, |
| 312 | "expires_at_ms": { |
| 313 | "name": "expires_at_ms", |
| 314 | "type": "integer", |
| 315 | "primaryKey": false, |
| 316 | "notNull": true, |
| 317 | "autoincrement": false |
| 318 | } |
| 319 | }, |
| 320 | "indexes": { |
| 321 | "locks_root_node_idx": { |
| 322 | "name": "locks_root_node_idx", |
| 323 | "columns": [ |
| 324 | "root_node_id" |
| 325 | ], |
| 326 | "isUnique": false |
| 327 | }, |
| 328 | "locks_root_path_idx": { |
| 329 | "name": "locks_root_path_idx", |
| 330 | "columns": [ |
| 331 | "root_path" |
| 332 | ], |
| 333 | "isUnique": false |
| 334 | }, |
| 335 | "locks_expires_idx": { |
| 336 | "name": "locks_expires_idx", |
| 337 | "columns": [ |
| 338 | "expires_at_ms" |
| 339 | ], |
| 340 | "isUnique": false |
| 341 | }, |
| 342 | "locks_principal_idx": { |
| 343 | "name": "locks_principal_idx", |
| 344 | "columns": [ |
| 345 | "principal_subject_id" |
| 346 | ], |
| 347 | "isUnique": false |
| 348 | } |
| 349 | }, |
| 350 | "foreignKeys": { |
| 351 | "locks_root_node_id_nodes_id_fk": { |
| 352 | "name": "locks_root_node_id_nodes_id_fk", |
| 353 | "tableFrom": "locks", |
| 354 | "tableTo": "nodes", |
| 355 | "columnsFrom": [ |
| 356 | "root_node_id" |
| 357 | ], |
| 358 | "columnsTo": [ |
| 359 | "id" |
| 360 | ], |
| 361 | "onDelete": "cascade", |
| 362 | "onUpdate": "no action" |
| 363 | } |
| 364 | }, |
| 365 | "compositePrimaryKeys": {}, |
| 366 | "uniqueConstraints": {}, |
| 367 | "checkConstraints": { |
| 368 | "locks_scope_check": { |
| 369 | "name": "locks_scope_check", |
| 370 | "value": "\"locks\".\"scope\" in ('exclusive', 'shared')" |
| 371 | }, |
| 372 | "locks_depth_check": { |
| 373 | "name": "locks_depth_check", |
| 374 | "value": "\"locks\".\"depth\" in ('0', 'infinity')" |
| 375 | } |
| 376 | } |
| 377 | }, |
| 378 | "nodes": { |
| 379 | "name": "nodes", |
| 380 | "columns": { |
| 381 | "id": { |
| 382 | "name": "id", |
| 383 | "type": "text", |
| 384 | "primaryKey": true, |
| 385 | "notNull": true, |
| 386 | "autoincrement": false |
| 387 | }, |
| 388 | "parent_id": { |
| 389 | "name": "parent_id", |
| 390 | "type": "text", |
| 391 | "primaryKey": false, |
| 392 | "notNull": false, |
| 393 | "autoincrement": false |
| 394 | }, |
| 395 | "name": { |
| 396 | "name": "name", |
| 397 | "type": "text", |
| 398 | "primaryKey": false, |
| 399 | "notNull": true, |
| 400 | "autoincrement": false |
| 401 | }, |
| 402 | "kind": { |
| 403 | "name": "kind", |
| 404 | "type": "text", |
| 405 | "primaryKey": false, |
| 406 | "notNull": true, |
| 407 | "autoincrement": false |
| 408 | }, |
| 409 | "blob_id": { |
| 410 | "name": "blob_id", |
| 411 | "type": "text", |
| 412 | "primaryKey": false, |
| 413 | "notNull": false, |
| 414 | "autoincrement": false |
| 415 | }, |
| 416 | "size": { |
| 417 | "name": "size", |
| 418 | "type": "integer", |
| 419 | "primaryKey": false, |
| 420 | "notNull": true, |
| 421 | "autoincrement": false, |
| 422 | "default": 0 |
| 423 | }, |
| 424 | "content_type": { |
| 425 | "name": "content_type", |
| 426 | "type": "text", |
| 427 | "primaryKey": false, |
| 428 | "notNull": false, |
| 429 | "autoincrement": false |
| 430 | }, |
| 431 | "content_language": { |
| 432 | "name": "content_language", |
| 433 | "type": "text", |
| 434 | "primaryKey": false, |
| 435 | "notNull": false, |
| 436 | "autoincrement": false |
| 437 | }, |
| 438 | "etag": { |
| 439 | "name": "etag", |
| 440 | "type": "text", |
| 441 | "primaryKey": false, |
| 442 | "notNull": false, |
| 443 | "autoincrement": false |
| 444 | }, |
| 445 | "root_marker": { |
| 446 | "name": "root_marker", |
| 447 | "type": "text", |
| 448 | "primaryKey": false, |
| 449 | "notNull": false, |
| 450 | "autoincrement": false |
| 451 | }, |
| 452 | "created_at_ms": { |
| 453 | "name": "created_at_ms", |
| 454 | "type": "integer", |
| 455 | "primaryKey": false, |
| 456 | "notNull": true, |
| 457 | "autoincrement": false |
| 458 | }, |
| 459 | "modified_at_ms": { |
| 460 | "name": "modified_at_ms", |
| 461 | "type": "integer", |
| 462 | "primaryKey": false, |
| 463 | "notNull": true, |
| 464 | "autoincrement": false |
| 465 | }, |
| 466 | "version": { |
| 467 | "name": "version", |
| 468 | "type": "integer", |
| 469 | "primaryKey": false, |
| 470 | "notNull": true, |
| 471 | "autoincrement": false, |
| 472 | "default": 1 |
| 473 | } |
| 474 | }, |
| 475 | "indexes": { |
| 476 | "nodes_parent_name_unique": { |
| 477 | "name": "nodes_parent_name_unique", |
| 478 | "columns": [ |
| 479 | "parent_id", |
| 480 | "name" |
| 481 | ], |
| 482 | "isUnique": true |
| 483 | }, |
| 484 | "nodes_root_marker_unique": { |
| 485 | "name": "nodes_root_marker_unique", |
| 486 | "columns": [ |
| 487 | "root_marker" |
| 488 | ], |
| 489 | "isUnique": true |
| 490 | }, |
| 491 | "nodes_parent_kind_idx": { |
| 492 | "name": "nodes_parent_kind_idx", |
| 493 | "columns": [ |
| 494 | "parent_id", |
| 495 | "kind" |
| 496 | ], |
| 497 | "isUnique": false |
| 498 | }, |
| 499 | "nodes_blob_idx": { |
| 500 | "name": "nodes_blob_idx", |
| 501 | "columns": [ |
| 502 | "blob_id" |
| 503 | ], |
| 504 | "isUnique": false |
| 505 | }, |
| 506 | "nodes_modified_idx": { |
| 507 | "name": "nodes_modified_idx", |
| 508 | "columns": [ |
| 509 | "modified_at_ms" |
| 510 | ], |
| 511 | "isUnique": false |
| 512 | } |
| 513 | }, |
| 514 | "foreignKeys": { |
| 515 | "nodes_parent_id_nodes_id_fk": { |
| 516 | "name": "nodes_parent_id_nodes_id_fk", |
| 517 | "tableFrom": "nodes", |
| 518 | "tableTo": "nodes", |
| 519 | "columnsFrom": [ |
| 520 | "parent_id" |
| 521 | ], |
| 522 | "columnsTo": [ |
| 523 | "id" |
| 524 | ], |
| 525 | "onDelete": "cascade", |
| 526 | "onUpdate": "no action" |
| 527 | }, |
| 528 | "nodes_blob_id_blobs_blob_id_fk": { |
| 529 | "name": "nodes_blob_id_blobs_blob_id_fk", |
| 530 | "tableFrom": "nodes", |
| 531 | "tableTo": "blobs", |
| 532 | "columnsFrom": [ |
| 533 | "blob_id" |
| 534 | ], |
| 535 | "columnsTo": [ |
| 536 | "blob_id" |
| 537 | ], |
| 538 | "onDelete": "restrict", |
| 539 | "onUpdate": "no action" |
| 540 | } |
| 541 | }, |
| 542 | "compositePrimaryKeys": {}, |
| 543 | "uniqueConstraints": {}, |
| 544 | "checkConstraints": { |
| 545 | "nodes_kind_check": { |
| 546 | "name": "nodes_kind_check", |
| 547 | "value": "\"nodes\".\"kind\" in ('collection', 'file')" |
| 548 | }, |
| 549 | "nodes_root_marker_check": { |
| 550 | "name": "nodes_root_marker_check", |
| 551 | "value": "\"nodes\".\"root_marker\" is null or \"nodes\".\"root_marker\" = 'root'" |
| 552 | }, |
| 553 | "nodes_collection_blob_check": { |
| 554 | "name": "nodes_collection_blob_check", |
| 555 | "value": "\"nodes\".\"kind\" != 'collection' or \"nodes\".\"blob_id\" is null" |
| 556 | } |
| 557 | } |
| 558 | }, |
| 559 | "pending_uploads": { |
| 560 | "name": "pending_uploads", |
| 561 | "columns": { |
| 562 | "upload_id": { |
| 563 | "name": "upload_id", |
| 564 | "type": "text", |
| 565 | "primaryKey": true, |
| 566 | "notNull": true, |
| 567 | "autoincrement": false |
| 568 | }, |
| 569 | "node_id": { |
| 570 | "name": "node_id", |
| 571 | "type": "text", |
| 572 | "primaryKey": false, |
| 573 | "notNull": false, |
| 574 | "autoincrement": false |
| 575 | }, |
| 576 | "path": { |
| 577 | "name": "path", |
| 578 | "type": "text", |
| 579 | "primaryKey": false, |
| 580 | "notNull": true, |
| 581 | "autoincrement": false |
| 582 | }, |
| 583 | "blob_id": { |
| 584 | "name": "blob_id", |
| 585 | "type": "text", |
| 586 | "primaryKey": false, |
| 587 | "notNull": true, |
| 588 | "autoincrement": false |
| 589 | }, |
| 590 | "blob_key": { |
| 591 | "name": "blob_key", |
| 592 | "type": "text", |
| 593 | "primaryKey": false, |
| 594 | "notNull": true, |
| 595 | "autoincrement": false |
| 596 | }, |
| 597 | "created_at_ms": { |
| 598 | "name": "created_at_ms", |
| 599 | "type": "integer", |
| 600 | "primaryKey": false, |
| 601 | "notNull": true, |
| 602 | "autoincrement": false |
| 603 | }, |
| 604 | "expires_at_ms": { |
| 605 | "name": "expires_at_ms", |
| 606 | "type": "integer", |
| 607 | "primaryKey": false, |
| 608 | "notNull": true, |
| 609 | "autoincrement": false |
| 610 | }, |
| 611 | "state": { |
| 612 | "name": "state", |
| 613 | "type": "text", |
| 614 | "primaryKey": false, |
| 615 | "notNull": true, |
| 616 | "autoincrement": false |
| 617 | } |
| 618 | }, |
| 619 | "indexes": { |
| 620 | "pending_uploads_state_expires_idx": { |
| 621 | "name": "pending_uploads_state_expires_idx", |
| 622 | "columns": [ |
| 623 | "state", |
| 624 | "expires_at_ms" |
| 625 | ], |
| 626 | "isUnique": false |
| 627 | }, |
| 628 | "pending_uploads_path_idx": { |
| 629 | "name": "pending_uploads_path_idx", |
| 630 | "columns": [ |
| 631 | "path" |
| 632 | ], |
| 633 | "isUnique": false |
| 634 | }, |
| 635 | "pending_uploads_blob_idx": { |
| 636 | "name": "pending_uploads_blob_idx", |
| 637 | "columns": [ |
| 638 | "blob_id" |
| 639 | ], |
| 640 | "isUnique": false |
| 641 | } |
| 642 | }, |
| 643 | "foreignKeys": { |
| 644 | "pending_uploads_node_id_nodes_id_fk": { |
| 645 | "name": "pending_uploads_node_id_nodes_id_fk", |
| 646 | "tableFrom": "pending_uploads", |
| 647 | "tableTo": "nodes", |
| 648 | "columnsFrom": [ |
| 649 | "node_id" |
| 650 | ], |
| 651 | "columnsTo": [ |
| 652 | "id" |
| 653 | ], |
| 654 | "onDelete": "set null", |
| 655 | "onUpdate": "no action" |
| 656 | } |
| 657 | }, |
| 658 | "compositePrimaryKeys": {}, |
| 659 | "uniqueConstraints": {}, |
| 660 | "checkConstraints": { |
| 661 | "pending_uploads_state_check": { |
| 662 | "name": "pending_uploads_state_check", |
| 663 | "value": "\"pending_uploads\".\"state\" in ('pending', 'committed', 'aborted')" |
| 664 | } |
| 665 | } |
| 666 | } |
| 667 | }, |
| 668 | "views": {}, |
| 669 | "enums": {}, |
| 670 | "_meta": { |
| 671 | "schemas": {}, |
| 672 | "tables": {}, |
| 673 | "columns": {} |
| 674 | }, |
| 675 | "internal": { |
| 676 | "indexes": {} |
| 677 | } |
| 678 | } |