the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

Set file/volume id defaults and fix sandbox query

+1345 -3
+1 -1
apps/api/src/xrpc/io/pocketenv/file/getFiles.ts
··· 94 94 ? and( 95 95 eq(users.did, auth.credentials.did), 96 96 or( 97 - eq(sandboxFiles.sandboxId, params.sandboxId), 97 + eq(sandboxes.id, params.sandboxId), 98 98 eq(sandboxes.name, params.sandboxId), 99 99 ), 100 100 )
+10
apps/cf-sandbox/drizzle/0031_stormy_retro_girl.sql
··· 1 + CREATE OR REPLACE FUNCTION file_id() 2 + RETURNS text AS $$ 3 + SELECT 'file_' || xata_private.xid(); 4 + $$ LANGUAGE sql IMMUTABLE; 5 + 6 + DROP INDEX "unique_sandbox_file";--> statement-breakpoint 7 + DROP INDEX "unique_sandbox_secret";--> statement-breakpoint 8 + DROP INDEX "unique_sandbox_variables";--> statement-breakpoint 9 + ALTER TABLE "sandbox_files" ALTER COLUMN "id" SET DEFAULT file_id();--> statement-breakpoint 10 + ALTER TABLE "sandbox_volumes" ALTER COLUMN "id" SET DEFAULT volume_id();
+1325
apps/cf-sandbox/drizzle/meta/0031_snapshot.json
··· 1 + { 2 + "id": "1eb6b42c-adbc-416b-a3c6-577289f7804a", 3 + "prevId": "d08c10f2-12e3-4ad5-896b-5de7dc05afb9", 4 + "version": "7", 5 + "dialect": "postgresql", 6 + "tables": { 7 + "public.authorized_keys": { 8 + "name": "authorized_keys", 9 + "schema": "", 10 + "columns": { 11 + "id": { 12 + "name": "id", 13 + "type": "text", 14 + "primaryKey": true, 15 + "notNull": true, 16 + "default": "xata_id()" 17 + }, 18 + "sandbox_id": { 19 + "name": "sandbox_id", 20 + "type": "text", 21 + "primaryKey": false, 22 + "notNull": false 23 + }, 24 + "public_key": { 25 + "name": "public_key", 26 + "type": "text", 27 + "primaryKey": false, 28 + "notNull": true 29 + }, 30 + "created_at": { 31 + "name": "created_at", 32 + "type": "timestamp", 33 + "primaryKey": false, 34 + "notNull": true, 35 + "default": "now()" 36 + } 37 + }, 38 + "indexes": {}, 39 + "foreignKeys": { 40 + "authorized_keys_sandbox_id_sandboxes_id_fk": { 41 + "name": "authorized_keys_sandbox_id_sandboxes_id_fk", 42 + "tableFrom": "authorized_keys", 43 + "tableTo": "sandboxes", 44 + "columnsFrom": [ 45 + "sandbox_id" 46 + ], 47 + "columnsTo": [ 48 + "id" 49 + ], 50 + "onDelete": "no action", 51 + "onUpdate": "no action" 52 + } 53 + }, 54 + "compositePrimaryKeys": {}, 55 + "uniqueConstraints": {}, 56 + "policies": {}, 57 + "checkConstraints": {}, 58 + "isRLSEnabled": false 59 + }, 60 + "public.files": { 61 + "name": "files", 62 + "schema": "", 63 + "columns": { 64 + "id": { 65 + "name": "id", 66 + "type": "text", 67 + "primaryKey": true, 68 + "notNull": true, 69 + "default": "xata_id()" 70 + }, 71 + "content": { 72 + "name": "content", 73 + "type": "text", 74 + "primaryKey": false, 75 + "notNull": true 76 + }, 77 + "created_at": { 78 + "name": "created_at", 79 + "type": "timestamp", 80 + "primaryKey": false, 81 + "notNull": true, 82 + "default": "now()" 83 + }, 84 + "updated_at": { 85 + "name": "updated_at", 86 + "type": "timestamp", 87 + "primaryKey": false, 88 + "notNull": true, 89 + "default": "now()" 90 + } 91 + }, 92 + "indexes": {}, 93 + "foreignKeys": {}, 94 + "compositePrimaryKeys": {}, 95 + "uniqueConstraints": {}, 96 + "policies": {}, 97 + "checkConstraints": {}, 98 + "isRLSEnabled": false 99 + }, 100 + "public.sandbox_files": { 101 + "name": "sandbox_files", 102 + "schema": "", 103 + "columns": { 104 + "id": { 105 + "name": "id", 106 + "type": "text", 107 + "primaryKey": true, 108 + "notNull": true, 109 + "default": "file_id()" 110 + }, 111 + "sandbox_id": { 112 + "name": "sandbox_id", 113 + "type": "text", 114 + "primaryKey": false, 115 + "notNull": true 116 + }, 117 + "file_id": { 118 + "name": "file_id", 119 + "type": "text", 120 + "primaryKey": false, 121 + "notNull": true 122 + }, 123 + "path": { 124 + "name": "path", 125 + "type": "text", 126 + "primaryKey": false, 127 + "notNull": true 128 + }, 129 + "created_at": { 130 + "name": "created_at", 131 + "type": "timestamp", 132 + "primaryKey": false, 133 + "notNull": true, 134 + "default": "now()" 135 + }, 136 + "updated_at": { 137 + "name": "updated_at", 138 + "type": "timestamp", 139 + "primaryKey": false, 140 + "notNull": true, 141 + "default": "now()" 142 + } 143 + }, 144 + "indexes": { 145 + "unique_sandbox_file_path": { 146 + "name": "unique_sandbox_file_path", 147 + "columns": [ 148 + { 149 + "expression": "sandbox_id", 150 + "isExpression": false, 151 + "asc": true, 152 + "nulls": "last" 153 + }, 154 + { 155 + "expression": "path", 156 + "isExpression": false, 157 + "asc": true, 158 + "nulls": "last" 159 + } 160 + ], 161 + "isUnique": true, 162 + "concurrently": false, 163 + "method": "btree", 164 + "with": {} 165 + } 166 + }, 167 + "foreignKeys": { 168 + "sandbox_files_sandbox_id_sandboxes_id_fk": { 169 + "name": "sandbox_files_sandbox_id_sandboxes_id_fk", 170 + "tableFrom": "sandbox_files", 171 + "tableTo": "sandboxes", 172 + "columnsFrom": [ 173 + "sandbox_id" 174 + ], 175 + "columnsTo": [ 176 + "id" 177 + ], 178 + "onDelete": "no action", 179 + "onUpdate": "no action" 180 + }, 181 + "sandbox_files_file_id_files_id_fk": { 182 + "name": "sandbox_files_file_id_files_id_fk", 183 + "tableFrom": "sandbox_files", 184 + "tableTo": "files", 185 + "columnsFrom": [ 186 + "file_id" 187 + ], 188 + "columnsTo": [ 189 + "id" 190 + ], 191 + "onDelete": "no action", 192 + "onUpdate": "no action" 193 + } 194 + }, 195 + "compositePrimaryKeys": {}, 196 + "uniqueConstraints": {}, 197 + "policies": {}, 198 + "checkConstraints": {}, 199 + "isRLSEnabled": false 200 + }, 201 + "public.sandbox_ports": { 202 + "name": "sandbox_ports", 203 + "schema": "", 204 + "columns": { 205 + "id": { 206 + "name": "id", 207 + "type": "text", 208 + "primaryKey": true, 209 + "notNull": true, 210 + "default": "xata_id()" 211 + }, 212 + "sandbox_id": { 213 + "name": "sandbox_id", 214 + "type": "text", 215 + "primaryKey": false, 216 + "notNull": true 217 + }, 218 + "exposed_port": { 219 + "name": "exposed_port", 220 + "type": "integer", 221 + "primaryKey": false, 222 + "notNull": true 223 + }, 224 + "preview_url": { 225 + "name": "preview_url", 226 + "type": "text", 227 + "primaryKey": false, 228 + "notNull": false 229 + }, 230 + "description": { 231 + "name": "description", 232 + "type": "text", 233 + "primaryKey": false, 234 + "notNull": false 235 + }, 236 + "created_at": { 237 + "name": "created_at", 238 + "type": "timestamp", 239 + "primaryKey": false, 240 + "notNull": true, 241 + "default": "now()" 242 + }, 243 + "updated_at": { 244 + "name": "updated_at", 245 + "type": "timestamp", 246 + "primaryKey": false, 247 + "notNull": true, 248 + "default": "now()" 249 + } 250 + }, 251 + "indexes": { 252 + "unique_sandbox_port": { 253 + "name": "unique_sandbox_port", 254 + "columns": [ 255 + { 256 + "expression": "sandbox_id", 257 + "isExpression": false, 258 + "asc": true, 259 + "nulls": "last" 260 + }, 261 + { 262 + "expression": "exposed_port", 263 + "isExpression": false, 264 + "asc": true, 265 + "nulls": "last" 266 + } 267 + ], 268 + "isUnique": true, 269 + "concurrently": false, 270 + "method": "btree", 271 + "with": {} 272 + } 273 + }, 274 + "foreignKeys": { 275 + "sandbox_ports_sandbox_id_sandboxes_id_fk": { 276 + "name": "sandbox_ports_sandbox_id_sandboxes_id_fk", 277 + "tableFrom": "sandbox_ports", 278 + "tableTo": "sandboxes", 279 + "columnsFrom": [ 280 + "sandbox_id" 281 + ], 282 + "columnsTo": [ 283 + "id" 284 + ], 285 + "onDelete": "no action", 286 + "onUpdate": "no action" 287 + } 288 + }, 289 + "compositePrimaryKeys": {}, 290 + "uniqueConstraints": {}, 291 + "policies": {}, 292 + "checkConstraints": {}, 293 + "isRLSEnabled": false 294 + }, 295 + "public.sandbox_secrets": { 296 + "name": "sandbox_secrets", 297 + "schema": "", 298 + "columns": { 299 + "id": { 300 + "name": "id", 301 + "type": "text", 302 + "primaryKey": true, 303 + "notNull": true, 304 + "default": "xata_id()" 305 + }, 306 + "sandbox_id": { 307 + "name": "sandbox_id", 308 + "type": "text", 309 + "primaryKey": false, 310 + "notNull": true 311 + }, 312 + "secret_id": { 313 + "name": "secret_id", 314 + "type": "text", 315 + "primaryKey": false, 316 + "notNull": true 317 + }, 318 + "name": { 319 + "name": "name", 320 + "type": "text", 321 + "primaryKey": false, 322 + "notNull": false 323 + }, 324 + "created_at": { 325 + "name": "created_at", 326 + "type": "timestamp", 327 + "primaryKey": false, 328 + "notNull": true, 329 + "default": "now()" 330 + }, 331 + "updated_at": { 332 + "name": "updated_at", 333 + "type": "timestamp", 334 + "primaryKey": false, 335 + "notNull": true, 336 + "default": "now()" 337 + } 338 + }, 339 + "indexes": { 340 + "unique_sandbox_secret_by_name": { 341 + "name": "unique_sandbox_secret_by_name", 342 + "columns": [ 343 + { 344 + "expression": "sandbox_id", 345 + "isExpression": false, 346 + "asc": true, 347 + "nulls": "last" 348 + }, 349 + { 350 + "expression": "name", 351 + "isExpression": false, 352 + "asc": true, 353 + "nulls": "last" 354 + } 355 + ], 356 + "isUnique": true, 357 + "concurrently": false, 358 + "method": "btree", 359 + "with": {} 360 + } 361 + }, 362 + "foreignKeys": { 363 + "sandbox_secrets_sandbox_id_sandboxes_id_fk": { 364 + "name": "sandbox_secrets_sandbox_id_sandboxes_id_fk", 365 + "tableFrom": "sandbox_secrets", 366 + "tableTo": "sandboxes", 367 + "columnsFrom": [ 368 + "sandbox_id" 369 + ], 370 + "columnsTo": [ 371 + "id" 372 + ], 373 + "onDelete": "no action", 374 + "onUpdate": "no action" 375 + }, 376 + "sandbox_secrets_secret_id_secrets_id_fk": { 377 + "name": "sandbox_secrets_secret_id_secrets_id_fk", 378 + "tableFrom": "sandbox_secrets", 379 + "tableTo": "secrets", 380 + "columnsFrom": [ 381 + "secret_id" 382 + ], 383 + "columnsTo": [ 384 + "id" 385 + ], 386 + "onDelete": "no action", 387 + "onUpdate": "no action" 388 + } 389 + }, 390 + "compositePrimaryKeys": {}, 391 + "uniqueConstraints": {}, 392 + "policies": {}, 393 + "checkConstraints": {}, 394 + "isRLSEnabled": false 395 + }, 396 + "public.sandbox_variables": { 397 + "name": "sandbox_variables", 398 + "schema": "", 399 + "columns": { 400 + "id": { 401 + "name": "id", 402 + "type": "text", 403 + "primaryKey": true, 404 + "notNull": true, 405 + "default": "xata_id()" 406 + }, 407 + "sandbox_id": { 408 + "name": "sandbox_id", 409 + "type": "text", 410 + "primaryKey": false, 411 + "notNull": true 412 + }, 413 + "variable_id": { 414 + "name": "variable_id", 415 + "type": "text", 416 + "primaryKey": false, 417 + "notNull": true 418 + }, 419 + "name": { 420 + "name": "name", 421 + "type": "text", 422 + "primaryKey": false, 423 + "notNull": true 424 + }, 425 + "created_at": { 426 + "name": "created_at", 427 + "type": "timestamp", 428 + "primaryKey": false, 429 + "notNull": true, 430 + "default": "now()" 431 + }, 432 + "updated_at": { 433 + "name": "updated_at", 434 + "type": "timestamp", 435 + "primaryKey": false, 436 + "notNull": true, 437 + "default": "now()" 438 + } 439 + }, 440 + "indexes": { 441 + "unique_sandbox_variables_by_name": { 442 + "name": "unique_sandbox_variables_by_name", 443 + "columns": [ 444 + { 445 + "expression": "sandbox_id", 446 + "isExpression": false, 447 + "asc": true, 448 + "nulls": "last" 449 + }, 450 + { 451 + "expression": "name", 452 + "isExpression": false, 453 + "asc": true, 454 + "nulls": "last" 455 + } 456 + ], 457 + "isUnique": true, 458 + "concurrently": false, 459 + "method": "btree", 460 + "with": {} 461 + } 462 + }, 463 + "foreignKeys": { 464 + "sandbox_variables_sandbox_id_sandboxes_id_fk": { 465 + "name": "sandbox_variables_sandbox_id_sandboxes_id_fk", 466 + "tableFrom": "sandbox_variables", 467 + "tableTo": "sandboxes", 468 + "columnsFrom": [ 469 + "sandbox_id" 470 + ], 471 + "columnsTo": [ 472 + "id" 473 + ], 474 + "onDelete": "no action", 475 + "onUpdate": "no action" 476 + }, 477 + "sandbox_variables_variable_id_variables_id_fk": { 478 + "name": "sandbox_variables_variable_id_variables_id_fk", 479 + "tableFrom": "sandbox_variables", 480 + "tableTo": "variables", 481 + "columnsFrom": [ 482 + "variable_id" 483 + ], 484 + "columnsTo": [ 485 + "id" 486 + ], 487 + "onDelete": "no action", 488 + "onUpdate": "no action" 489 + } 490 + }, 491 + "compositePrimaryKeys": {}, 492 + "uniqueConstraints": {}, 493 + "policies": {}, 494 + "checkConstraints": {}, 495 + "isRLSEnabled": false 496 + }, 497 + "public.sandbox_volumes": { 498 + "name": "sandbox_volumes", 499 + "schema": "", 500 + "columns": { 501 + "id": { 502 + "name": "id", 503 + "type": "text", 504 + "primaryKey": true, 505 + "notNull": true, 506 + "default": "volume_id()" 507 + }, 508 + "sandbox_id": { 509 + "name": "sandbox_id", 510 + "type": "text", 511 + "primaryKey": false, 512 + "notNull": true 513 + }, 514 + "volume_id": { 515 + "name": "volume_id", 516 + "type": "text", 517 + "primaryKey": false, 518 + "notNull": true 519 + }, 520 + "name": { 521 + "name": "name", 522 + "type": "text", 523 + "primaryKey": false, 524 + "notNull": false 525 + }, 526 + "path": { 527 + "name": "path", 528 + "type": "text", 529 + "primaryKey": false, 530 + "notNull": true 531 + }, 532 + "created_at": { 533 + "name": "created_at", 534 + "type": "timestamp", 535 + "primaryKey": false, 536 + "notNull": true, 537 + "default": "now()" 538 + }, 539 + "updated_at": { 540 + "name": "updated_at", 541 + "type": "timestamp", 542 + "primaryKey": false, 543 + "notNull": true, 544 + "default": "now()" 545 + } 546 + }, 547 + "indexes": { 548 + "unique_sandbox_volume_path": { 549 + "name": "unique_sandbox_volume_path", 550 + "columns": [ 551 + { 552 + "expression": "sandbox_id", 553 + "isExpression": false, 554 + "asc": true, 555 + "nulls": "last" 556 + }, 557 + { 558 + "expression": "path", 559 + "isExpression": false, 560 + "asc": true, 561 + "nulls": "last" 562 + } 563 + ], 564 + "isUnique": true, 565 + "concurrently": false, 566 + "method": "btree", 567 + "with": {} 568 + } 569 + }, 570 + "foreignKeys": { 571 + "sandbox_volumes_sandbox_id_sandboxes_id_fk": { 572 + "name": "sandbox_volumes_sandbox_id_sandboxes_id_fk", 573 + "tableFrom": "sandbox_volumes", 574 + "tableTo": "sandboxes", 575 + "columnsFrom": [ 576 + "sandbox_id" 577 + ], 578 + "columnsTo": [ 579 + "id" 580 + ], 581 + "onDelete": "no action", 582 + "onUpdate": "no action" 583 + }, 584 + "sandbox_volumes_volume_id_volumes_id_fk": { 585 + "name": "sandbox_volumes_volume_id_volumes_id_fk", 586 + "tableFrom": "sandbox_volumes", 587 + "tableTo": "volumes", 588 + "columnsFrom": [ 589 + "volume_id" 590 + ], 591 + "columnsTo": [ 592 + "id" 593 + ], 594 + "onDelete": "no action", 595 + "onUpdate": "no action" 596 + } 597 + }, 598 + "compositePrimaryKeys": {}, 599 + "uniqueConstraints": {}, 600 + "policies": {}, 601 + "checkConstraints": {}, 602 + "isRLSEnabled": false 603 + }, 604 + "public.sandboxes": { 605 + "name": "sandboxes", 606 + "schema": "", 607 + "columns": { 608 + "id": { 609 + "name": "id", 610 + "type": "text", 611 + "primaryKey": true, 612 + "notNull": true, 613 + "default": "sandbox_id()" 614 + }, 615 + "base": { 616 + "name": "base", 617 + "type": "text", 618 + "primaryKey": false, 619 + "notNull": false 620 + }, 621 + "name": { 622 + "name": "name", 623 + "type": "text", 624 + "primaryKey": false, 625 + "notNull": true 626 + }, 627 + "display_name": { 628 + "name": "display_name", 629 + "type": "text", 630 + "primaryKey": false, 631 + "notNull": false 632 + }, 633 + "uri": { 634 + "name": "uri", 635 + "type": "text", 636 + "primaryKey": false, 637 + "notNull": false 638 + }, 639 + "cid": { 640 + "name": "cid", 641 + "type": "text", 642 + "primaryKey": false, 643 + "notNull": false 644 + }, 645 + "repo": { 646 + "name": "repo", 647 + "type": "text", 648 + "primaryKey": false, 649 + "notNull": false 650 + }, 651 + "provider": { 652 + "name": "provider", 653 + "type": "text", 654 + "primaryKey": false, 655 + "notNull": true, 656 + "default": "'cloudflare'" 657 + }, 658 + "description": { 659 + "name": "description", 660 + "type": "text", 661 + "primaryKey": false, 662 + "notNull": false 663 + }, 664 + "topics": { 665 + "name": "topics", 666 + "type": "text[]", 667 + "primaryKey": false, 668 + "notNull": false 669 + }, 670 + "logo": { 671 + "name": "logo", 672 + "type": "text", 673 + "primaryKey": false, 674 + "notNull": false 675 + }, 676 + "readme": { 677 + "name": "readme", 678 + "type": "text", 679 + "primaryKey": false, 680 + "notNull": false 681 + }, 682 + "public_key": { 683 + "name": "public_key", 684 + "type": "text", 685 + "primaryKey": false, 686 + "notNull": true 687 + }, 688 + "user_id": { 689 + "name": "user_id", 690 + "type": "text", 691 + "primaryKey": false, 692 + "notNull": false 693 + }, 694 + "instance_type": { 695 + "name": "instance_type", 696 + "type": "text", 697 + "primaryKey": false, 698 + "notNull": false 699 + }, 700 + "vcpus": { 701 + "name": "vcpus", 702 + "type": "integer", 703 + "primaryKey": false, 704 + "notNull": false 705 + }, 706 + "memory": { 707 + "name": "memory", 708 + "type": "integer", 709 + "primaryKey": false, 710 + "notNull": false 711 + }, 712 + "disk": { 713 + "name": "disk", 714 + "type": "integer", 715 + "primaryKey": false, 716 + "notNull": false 717 + }, 718 + "status": { 719 + "name": "status", 720 + "type": "text", 721 + "primaryKey": false, 722 + "notNull": true 723 + }, 724 + "keep_alive": { 725 + "name": "keep_alive", 726 + "type": "boolean", 727 + "primaryKey": false, 728 + "notNull": true, 729 + "default": false 730 + }, 731 + "sleep_after": { 732 + "name": "sleep_after", 733 + "type": "text", 734 + "primaryKey": false, 735 + "notNull": false 736 + }, 737 + "sandbox_id": { 738 + "name": "sandbox_id", 739 + "type": "text", 740 + "primaryKey": false, 741 + "notNull": false 742 + }, 743 + "installs": { 744 + "name": "installs", 745 + "type": "integer", 746 + "primaryKey": false, 747 + "notNull": true, 748 + "default": 0 749 + }, 750 + "started_at": { 751 + "name": "started_at", 752 + "type": "timestamp", 753 + "primaryKey": false, 754 + "notNull": false 755 + }, 756 + "created_at": { 757 + "name": "created_at", 758 + "type": "timestamp", 759 + "primaryKey": false, 760 + "notNull": true, 761 + "default": "now()" 762 + }, 763 + "updated_at": { 764 + "name": "updated_at", 765 + "type": "timestamp", 766 + "primaryKey": false, 767 + "notNull": true, 768 + "default": "now()" 769 + } 770 + }, 771 + "indexes": {}, 772 + "foreignKeys": { 773 + "sandboxes_user_id_users_id_fk": { 774 + "name": "sandboxes_user_id_users_id_fk", 775 + "tableFrom": "sandboxes", 776 + "tableTo": "users", 777 + "columnsFrom": [ 778 + "user_id" 779 + ], 780 + "columnsTo": [ 781 + "id" 782 + ], 783 + "onDelete": "no action", 784 + "onUpdate": "no action" 785 + } 786 + }, 787 + "compositePrimaryKeys": {}, 788 + "uniqueConstraints": { 789 + "sandboxes_name_unique": { 790 + "name": "sandboxes_name_unique", 791 + "nullsNotDistinct": false, 792 + "columns": [ 793 + "name" 794 + ] 795 + }, 796 + "sandboxes_uri_unique": { 797 + "name": "sandboxes_uri_unique", 798 + "nullsNotDistinct": false, 799 + "columns": [ 800 + "uri" 801 + ] 802 + }, 803 + "sandboxes_cid_unique": { 804 + "name": "sandboxes_cid_unique", 805 + "nullsNotDistinct": false, 806 + "columns": [ 807 + "cid" 808 + ] 809 + } 810 + }, 811 + "policies": {}, 812 + "checkConstraints": {}, 813 + "isRLSEnabled": false 814 + }, 815 + "public.secrets": { 816 + "name": "secrets", 817 + "schema": "", 818 + "columns": { 819 + "id": { 820 + "name": "id", 821 + "type": "text", 822 + "primaryKey": true, 823 + "notNull": true, 824 + "default": "secret_id()" 825 + }, 826 + "name": { 827 + "name": "name", 828 + "type": "text", 829 + "primaryKey": false, 830 + "notNull": true 831 + }, 832 + "value": { 833 + "name": "value", 834 + "type": "text", 835 + "primaryKey": false, 836 + "notNull": true 837 + }, 838 + "redacted": { 839 + "name": "redacted", 840 + "type": "text", 841 + "primaryKey": false, 842 + "notNull": false 843 + }, 844 + "created_at": { 845 + "name": "created_at", 846 + "type": "timestamp", 847 + "primaryKey": false, 848 + "notNull": true, 849 + "default": "now()" 850 + } 851 + }, 852 + "indexes": {}, 853 + "foreignKeys": {}, 854 + "compositePrimaryKeys": {}, 855 + "uniqueConstraints": {}, 856 + "policies": {}, 857 + "checkConstraints": {}, 858 + "isRLSEnabled": false 859 + }, 860 + "public.snapshots": { 861 + "name": "snapshots", 862 + "schema": "", 863 + "columns": { 864 + "id": { 865 + "name": "id", 866 + "type": "text", 867 + "primaryKey": true, 868 + "notNull": true, 869 + "default": "snapshot_id()" 870 + }, 871 + "slug": { 872 + "name": "slug", 873 + "type": "text", 874 + "primaryKey": false, 875 + "notNull": true 876 + }, 877 + "created_at": { 878 + "name": "created_at", 879 + "type": "timestamp", 880 + "primaryKey": false, 881 + "notNull": true, 882 + "default": "now()" 883 + } 884 + }, 885 + "indexes": {}, 886 + "foreignKeys": {}, 887 + "compositePrimaryKeys": {}, 888 + "uniqueConstraints": { 889 + "snapshots_slug_unique": { 890 + "name": "snapshots_slug_unique", 891 + "nullsNotDistinct": false, 892 + "columns": [ 893 + "slug" 894 + ] 895 + } 896 + }, 897 + "policies": {}, 898 + "checkConstraints": {}, 899 + "isRLSEnabled": false 900 + }, 901 + "public.ssh_keys": { 902 + "name": "ssh_keys", 903 + "schema": "", 904 + "columns": { 905 + "id": { 906 + "name": "id", 907 + "type": "text", 908 + "primaryKey": true, 909 + "notNull": true, 910 + "default": "xata_id()" 911 + }, 912 + "sandbox_id": { 913 + "name": "sandbox_id", 914 + "type": "text", 915 + "primaryKey": false, 916 + "notNull": true 917 + }, 918 + "public_key": { 919 + "name": "public_key", 920 + "type": "text", 921 + "primaryKey": false, 922 + "notNull": true 923 + }, 924 + "private_key": { 925 + "name": "private_key", 926 + "type": "text", 927 + "primaryKey": false, 928 + "notNull": true 929 + }, 930 + "redacted": { 931 + "name": "redacted", 932 + "type": "text", 933 + "primaryKey": false, 934 + "notNull": false 935 + }, 936 + "created_at": { 937 + "name": "created_at", 938 + "type": "timestamp", 939 + "primaryKey": false, 940 + "notNull": true, 941 + "default": "now()" 942 + } 943 + }, 944 + "indexes": { 945 + "unique_sandbox_ssh_key": { 946 + "name": "unique_sandbox_ssh_key", 947 + "columns": [ 948 + { 949 + "expression": "public_key", 950 + "isExpression": false, 951 + "asc": true, 952 + "nulls": "last" 953 + }, 954 + { 955 + "expression": "sandbox_id", 956 + "isExpression": false, 957 + "asc": true, 958 + "nulls": "last" 959 + } 960 + ], 961 + "isUnique": true, 962 + "concurrently": false, 963 + "method": "btree", 964 + "with": {} 965 + } 966 + }, 967 + "foreignKeys": { 968 + "ssh_keys_sandbox_id_sandboxes_id_fk": { 969 + "name": "ssh_keys_sandbox_id_sandboxes_id_fk", 970 + "tableFrom": "ssh_keys", 971 + "tableTo": "sandboxes", 972 + "columnsFrom": [ 973 + "sandbox_id" 974 + ], 975 + "columnsTo": [ 976 + "id" 977 + ], 978 + "onDelete": "no action", 979 + "onUpdate": "no action" 980 + } 981 + }, 982 + "compositePrimaryKeys": {}, 983 + "uniqueConstraints": {}, 984 + "policies": {}, 985 + "checkConstraints": {}, 986 + "isRLSEnabled": false 987 + }, 988 + "public.tailscale_auth_keys": { 989 + "name": "tailscale_auth_keys", 990 + "schema": "", 991 + "columns": { 992 + "id": { 993 + "name": "id", 994 + "type": "text", 995 + "primaryKey": true, 996 + "notNull": true, 997 + "default": "xata_id()" 998 + }, 999 + "sandbox_id": { 1000 + "name": "sandbox_id", 1001 + "type": "text", 1002 + "primaryKey": false, 1003 + "notNull": true 1004 + }, 1005 + "auth_key": { 1006 + "name": "auth_key", 1007 + "type": "text", 1008 + "primaryKey": false, 1009 + "notNull": true 1010 + }, 1011 + "redacted": { 1012 + "name": "redacted", 1013 + "type": "text", 1014 + "primaryKey": false, 1015 + "notNull": true 1016 + }, 1017 + "created_at": { 1018 + "name": "created_at", 1019 + "type": "timestamp", 1020 + "primaryKey": false, 1021 + "notNull": true, 1022 + "default": "now()" 1023 + } 1024 + }, 1025 + "indexes": {}, 1026 + "foreignKeys": { 1027 + "tailscale_auth_keys_sandbox_id_sandboxes_id_fk": { 1028 + "name": "tailscale_auth_keys_sandbox_id_sandboxes_id_fk", 1029 + "tableFrom": "tailscale_auth_keys", 1030 + "tableTo": "sandboxes", 1031 + "columnsFrom": [ 1032 + "sandbox_id" 1033 + ], 1034 + "columnsTo": [ 1035 + "id" 1036 + ], 1037 + "onDelete": "no action", 1038 + "onUpdate": "no action" 1039 + } 1040 + }, 1041 + "compositePrimaryKeys": {}, 1042 + "uniqueConstraints": {}, 1043 + "policies": {}, 1044 + "checkConstraints": {}, 1045 + "isRLSEnabled": false 1046 + }, 1047 + "public.users": { 1048 + "name": "users", 1049 + "schema": "", 1050 + "columns": { 1051 + "id": { 1052 + "name": "id", 1053 + "type": "text", 1054 + "primaryKey": true, 1055 + "notNull": true, 1056 + "default": "xata_id()" 1057 + }, 1058 + "did": { 1059 + "name": "did", 1060 + "type": "text", 1061 + "primaryKey": false, 1062 + "notNull": true 1063 + }, 1064 + "display_name": { 1065 + "name": "display_name", 1066 + "type": "text", 1067 + "primaryKey": false, 1068 + "notNull": false 1069 + }, 1070 + "handle": { 1071 + "name": "handle", 1072 + "type": "text", 1073 + "primaryKey": false, 1074 + "notNull": true 1075 + }, 1076 + "avatar": { 1077 + "name": "avatar", 1078 + "type": "text", 1079 + "primaryKey": false, 1080 + "notNull": false 1081 + }, 1082 + "created_at": { 1083 + "name": "created_at", 1084 + "type": "timestamp", 1085 + "primaryKey": false, 1086 + "notNull": true, 1087 + "default": "now()" 1088 + }, 1089 + "updated_at": { 1090 + "name": "updated_at", 1091 + "type": "timestamp", 1092 + "primaryKey": false, 1093 + "notNull": true, 1094 + "default": "now()" 1095 + } 1096 + }, 1097 + "indexes": {}, 1098 + "foreignKeys": {}, 1099 + "compositePrimaryKeys": {}, 1100 + "uniqueConstraints": { 1101 + "users_did_unique": { 1102 + "name": "users_did_unique", 1103 + "nullsNotDistinct": false, 1104 + "columns": [ 1105 + "did" 1106 + ] 1107 + }, 1108 + "users_handle_unique": { 1109 + "name": "users_handle_unique", 1110 + "nullsNotDistinct": false, 1111 + "columns": [ 1112 + "handle" 1113 + ] 1114 + } 1115 + }, 1116 + "policies": {}, 1117 + "checkConstraints": {}, 1118 + "isRLSEnabled": false 1119 + }, 1120 + "public.variables": { 1121 + "name": "variables", 1122 + "schema": "", 1123 + "columns": { 1124 + "id": { 1125 + "name": "id", 1126 + "type": "text", 1127 + "primaryKey": true, 1128 + "notNull": true, 1129 + "default": "variable_id()" 1130 + }, 1131 + "name": { 1132 + "name": "name", 1133 + "type": "text", 1134 + "primaryKey": false, 1135 + "notNull": true 1136 + }, 1137 + "value": { 1138 + "name": "value", 1139 + "type": "text", 1140 + "primaryKey": false, 1141 + "notNull": true 1142 + }, 1143 + "created_at": { 1144 + "name": "created_at", 1145 + "type": "timestamp", 1146 + "primaryKey": false, 1147 + "notNull": true, 1148 + "default": "now()" 1149 + }, 1150 + "updated_at": { 1151 + "name": "updated_at", 1152 + "type": "timestamp", 1153 + "primaryKey": false, 1154 + "notNull": true, 1155 + "default": "now()" 1156 + } 1157 + }, 1158 + "indexes": {}, 1159 + "foreignKeys": {}, 1160 + "compositePrimaryKeys": {}, 1161 + "uniqueConstraints": {}, 1162 + "policies": {}, 1163 + "checkConstraints": {}, 1164 + "isRLSEnabled": false 1165 + }, 1166 + "public.volumes": { 1167 + "name": "volumes", 1168 + "schema": "", 1169 + "columns": { 1170 + "id": { 1171 + "name": "id", 1172 + "type": "text", 1173 + "primaryKey": true, 1174 + "notNull": true, 1175 + "default": "volume_id()" 1176 + }, 1177 + "slug": { 1178 + "name": "slug", 1179 + "type": "text", 1180 + "primaryKey": false, 1181 + "notNull": true 1182 + }, 1183 + "size": { 1184 + "name": "size", 1185 + "type": "integer", 1186 + "primaryKey": false, 1187 + "notNull": true 1188 + }, 1189 + "size_unit": { 1190 + "name": "size_unit", 1191 + "type": "text", 1192 + "primaryKey": false, 1193 + "notNull": true 1194 + }, 1195 + "created_at": { 1196 + "name": "created_at", 1197 + "type": "timestamp", 1198 + "primaryKey": false, 1199 + "notNull": true, 1200 + "default": "now()" 1201 + }, 1202 + "updated_at": { 1203 + "name": "updated_at", 1204 + "type": "timestamp", 1205 + "primaryKey": false, 1206 + "notNull": true, 1207 + "default": "now()" 1208 + } 1209 + }, 1210 + "indexes": {}, 1211 + "foreignKeys": {}, 1212 + "compositePrimaryKeys": {}, 1213 + "uniqueConstraints": { 1214 + "volumes_slug_unique": { 1215 + "name": "volumes_slug_unique", 1216 + "nullsNotDistinct": false, 1217 + "columns": [ 1218 + "slug" 1219 + ] 1220 + } 1221 + }, 1222 + "policies": {}, 1223 + "checkConstraints": {}, 1224 + "isRLSEnabled": false 1225 + }, 1226 + "public.integrations": { 1227 + "name": "integrations", 1228 + "schema": "", 1229 + "columns": { 1230 + "id": { 1231 + "name": "id", 1232 + "type": "text", 1233 + "primaryKey": true, 1234 + "notNull": true, 1235 + "default": "xata_id()" 1236 + }, 1237 + "sandbox_id": { 1238 + "name": "sandbox_id", 1239 + "type": "text", 1240 + "primaryKey": false, 1241 + "notNull": true 1242 + }, 1243 + "name": { 1244 + "name": "name", 1245 + "type": "text", 1246 + "primaryKey": false, 1247 + "notNull": true 1248 + }, 1249 + "description": { 1250 + "name": "description", 1251 + "type": "text", 1252 + "primaryKey": false, 1253 + "notNull": false 1254 + }, 1255 + "webhook_url": { 1256 + "name": "webhook_url", 1257 + "type": "text", 1258 + "primaryKey": false, 1259 + "notNull": true 1260 + }, 1261 + "created_at": { 1262 + "name": "created_at", 1263 + "type": "timestamp", 1264 + "primaryKey": false, 1265 + "notNull": true, 1266 + "default": "now()" 1267 + } 1268 + }, 1269 + "indexes": { 1270 + "unique_sandbox_integration": { 1271 + "name": "unique_sandbox_integration", 1272 + "columns": [ 1273 + { 1274 + "expression": "sandbox_id", 1275 + "isExpression": false, 1276 + "asc": true, 1277 + "nulls": "last" 1278 + }, 1279 + { 1280 + "expression": "name", 1281 + "isExpression": false, 1282 + "asc": true, 1283 + "nulls": "last" 1284 + } 1285 + ], 1286 + "isUnique": true, 1287 + "concurrently": false, 1288 + "method": "btree", 1289 + "with": {} 1290 + } 1291 + }, 1292 + "foreignKeys": { 1293 + "integrations_sandbox_id_sandboxes_id_fk": { 1294 + "name": "integrations_sandbox_id_sandboxes_id_fk", 1295 + "tableFrom": "integrations", 1296 + "tableTo": "sandboxes", 1297 + "columnsFrom": [ 1298 + "sandbox_id" 1299 + ], 1300 + "columnsTo": [ 1301 + "id" 1302 + ], 1303 + "onDelete": "no action", 1304 + "onUpdate": "no action" 1305 + } 1306 + }, 1307 + "compositePrimaryKeys": {}, 1308 + "uniqueConstraints": {}, 1309 + "policies": {}, 1310 + "checkConstraints": {}, 1311 + "isRLSEnabled": false 1312 + } 1313 + }, 1314 + "enums": {}, 1315 + "schemas": {}, 1316 + "sequences": {}, 1317 + "roles": {}, 1318 + "policies": {}, 1319 + "views": {}, 1320 + "_meta": { 1321 + "columns": {}, 1322 + "schemas": {}, 1323 + "tables": {} 1324 + } 1325 + }
+7
apps/cf-sandbox/drizzle/meta/_journal.json
··· 218 218 "when": 1774023091060, 219 219 "tag": "0030_cheerful_loa", 220 220 "breakpoints": true 221 + }, 222 + { 223 + "idx": 31, 224 + "version": "7", 225 + "when": 1774062945617, 226 + "tag": "0031_stormy_retro_girl", 227 + "breakpoints": true 221 228 } 222 229 ] 223 230 }
+1 -1
apps/cf-sandbox/src/schema/sandbox-files.ts
··· 8 8 { 9 9 id: text("id") 10 10 .primaryKey() 11 - .default(sql`xata_id()`), 11 + .default(sql`file_id()`), 12 12 sandboxId: text("sandbox_id") 13 13 .notNull() 14 14 .references(() => sandboxes.id),
+1 -1
apps/cf-sandbox/src/schema/sandbox-volumes.ts
··· 8 8 { 9 9 id: text("id") 10 10 .primaryKey() 11 - .default(sql`xata_id()`), 11 + .default(sql`volume_id()`), 12 12 sandboxId: text("sandbox_id") 13 13 .notNull() 14 14 .references(() => sandboxes.id),