SPB Git forge

spb/rareindex

Public
54commits 1branches 0releases
7.1 MBsize
maindefault branch
10 days agolast push
TypeScript 61.9% HTML 37.2% SQL 0.7%

db: migration 0002 (resolver kind index, idempotent)

Simon-Pierre Boucher committed 17 days ago (Sep 7, 2026) parent 024329c

3 changed files +8,138 −0

added packages/database/migrations/0002_broken_the_phantom.sql +1 −0
@@ -0,0 +1 @@
1 +CREATE INDEX IF NOT EXISTS "normalized_records_status_kind_idx" ON "normalized_records" USING btree ("status","kind","created_at");
\ No newline at end of file
added packages/database/migrations/meta/0002_snapshot.json +8130 −0
@@ -0,0 +1,8130 @@
1 +{
2 + "id": "7a8f1170-2f80-48ba-a038-5a897c56d875",
3 + "prevId": "598f1844-5c95-4e05-93ae-8f3d5bb6f87b",
4 + "version": "7",
5 + "dialect": "postgresql",
6 + "tables": {
7 + "public.brands": {
8 + "name": "brands",
9 + "schema": "",
10 + "columns": {
11 + "slug": {
12 + "name": "slug",
13 + "type": "text",
14 + "primaryKey": true,
15 + "notNull": true
16 + },
17 + "name": {
18 + "name": "name",
19 + "type": "text",
20 + "primaryKey": false,
21 + "notNull": true
22 + },
23 + "category_slugs": {
24 + "name": "category_slugs",
25 + "type": "text[]",
26 + "primaryKey": false,
27 + "notNull": true,
28 + "default": "'{}'::text[]"
29 + },
30 + "country": {
31 + "name": "country",
32 + "type": "text",
33 + "primaryKey": false,
34 + "notNull": false
35 + },
36 + "founded_year": {
37 + "name": "founded_year",
38 + "type": "integer",
39 + "primaryKey": false,
40 + "notNull": false
41 + },
42 + "metadata": {
43 + "name": "metadata",
44 + "type": "jsonb",
45 + "primaryKey": false,
46 + "notNull": true,
47 + "default": "'{}'::jsonb"
48 + },
49 + "created_at": {
50 + "name": "created_at",
51 + "type": "timestamp with time zone",
52 + "primaryKey": false,
53 + "notNull": true,
54 + "default": "now()"
55 + }
56 + },
57 + "indexes": {
58 + "brands_name_idx": {
59 + "name": "brands_name_idx",
60 + "columns": [
61 + {
62 + "expression": "name",
63 + "isExpression": false,
64 + "asc": true,
65 + "nulls": "last"
66 + }
67 + ],
68 + "isUnique": false,
69 + "concurrently": false,
70 + "method": "btree",
71 + "with": {}
72 + }
73 + },
74 + "foreignKeys": {},
75 + "compositePrimaryKeys": {},
76 + "uniqueConstraints": {},
77 + "policies": {},
78 + "checkConstraints": {},
79 + "isRLSEnabled": false
80 + },
81 + "public.categories": {
82 + "name": "categories",
83 + "schema": "",
84 + "columns": {
85 + "slug": {
86 + "name": "slug",
87 + "type": "text",
88 + "primaryKey": true,
89 + "notNull": true
90 + },
91 + "parent_slug": {
92 + "name": "parent_slug",
93 + "type": "text",
94 + "primaryKey": false,
95 + "notNull": false
96 + },
97 + "family_slug": {
98 + "name": "family_slug",
99 + "type": "text",
100 + "primaryKey": false,
101 + "notNull": true
102 + },
103 + "name": {
104 + "name": "name",
105 + "type": "text",
106 + "primaryKey": false,
107 + "notNull": true
108 + },
109 + "short_name": {
110 + "name": "short_name",
111 + "type": "text",
112 + "primaryKey": false,
113 + "notNull": false
114 + },
115 + "description": {
116 + "name": "description",
117 + "type": "text",
118 + "primaryKey": false,
119 + "notNull": false
120 + },
121 + "level": {
122 + "name": "level",
123 + "type": "integer",
124 + "primaryKey": false,
125 + "notNull": true,
126 + "default": 0
127 + },
128 + "phase": {
129 + "name": "phase",
130 + "type": "integer",
131 + "primaryKey": false,
132 + "notNull": true,
133 + "default": 3
134 + },
135 + "active": {
136 + "name": "active",
137 + "type": "boolean",
138 + "primaryKey": false,
139 + "notNull": true,
140 + "default": true
141 + },
142 + "condition_scale": {
143 + "name": "condition_scale",
144 + "type": "text",
145 + "primaryKey": false,
146 + "notNull": false
147 + },
148 + "graders": {
149 + "name": "graders",
150 + "type": "text[]",
151 + "primaryKey": false,
152 + "notNull": true,
153 + "default": "'{}'::text[]"
154 + },
155 + "index_ticker": {
156 + "name": "index_ticker",
157 + "type": "text",
158 + "primaryKey": false,
159 + "notNull": false
160 + },
161 + "attribute_schema": {
162 + "name": "attribute_schema",
163 + "type": "jsonb",
164 + "primaryKey": false,
165 + "notNull": true,
166 + "default": "'{}'::jsonb"
167 + },
168 + "sort_order": {
169 + "name": "sort_order",
170 + "type": "integer",
171 + "primaryKey": false,
172 + "notNull": true,
173 + "default": 0
174 + },
175 + "compliance_flags": {
176 + "name": "compliance_flags",
177 + "type": "text[]",
178 + "primaryKey": false,
179 + "notNull": true,
180 + "default": "'{}'::text[]"
181 + },
182 + "icon": {
183 + "name": "icon",
184 + "type": "text",
185 + "primaryKey": false,
186 + "notNull": false
187 + },
188 + "created_at": {
189 + "name": "created_at",
190 + "type": "timestamp with time zone",
191 + "primaryKey": false,
192 + "notNull": true,
193 + "default": "now()"
194 + },
195 + "updated_at": {
196 + "name": "updated_at",
197 + "type": "timestamp with time zone",
198 + "primaryKey": false,
199 + "notNull": true,
200 + "default": "now()"
201 + }
202 + },
203 + "indexes": {
204 + "categories_parent_idx": {
205 + "name": "categories_parent_idx",
206 + "columns": [
207 + {
208 + "expression": "parent_slug",
209 + "isExpression": false,
210 + "asc": true,
211 + "nulls": "last"
212 + }
213 + ],
214 + "isUnique": false,
215 + "concurrently": false,
216 + "method": "btree",
217 + "with": {}
218 + },
219 + "categories_family_idx": {
220 + "name": "categories_family_idx",
221 + "columns": [
222 + {
223 + "expression": "family_slug",
224 + "isExpression": false,
225 + "asc": true,
226 + "nulls": "last"
227 + }
228 + ],
229 + "isUnique": false,
230 + "concurrently": false,
231 + "method": "btree",
232 + "with": {}
233 + }
234 + },
235 + "foreignKeys": {},
236 + "compositePrimaryKeys": {},
237 + "uniqueConstraints": {},
238 + "policies": {},
239 + "checkConstraints": {},
240 + "isRLSEnabled": false
241 + },
242 + "public.franchises": {
243 + "name": "franchises",
244 + "schema": "",
245 + "columns": {
246 + "slug": {
247 + "name": "slug",
248 + "type": "text",
249 + "primaryKey": true,
250 + "notNull": true
251 + },
252 + "name": {
253 + "name": "name",
254 + "type": "text",
255 + "primaryKey": false,
256 + "notNull": true
257 + },
258 + "owner": {
259 + "name": "owner",
260 + "type": "text",
261 + "primaryKey": false,
262 + "notNull": false
263 + },
264 + "category_slugs": {
265 + "name": "category_slugs",
266 + "type": "text[]",
267 + "primaryKey": false,
268 + "notNull": true,
269 + "default": "'{}'::text[]"
270 + },
271 + "metadata": {
272 + "name": "metadata",
273 + "type": "jsonb",
274 + "primaryKey": false,
275 + "notNull": true,
276 + "default": "'{}'::jsonb"
277 + },
278 + "created_at": {
279 + "name": "created_at",
280 + "type": "timestamp with time zone",
281 + "primaryKey": false,
282 + "notNull": true,
283 + "default": "now()"
284 + }
285 + },
286 + "indexes": {},
287 + "foreignKeys": {},
288 + "compositePrimaryKeys": {},
289 + "uniqueConstraints": {},
290 + "policies": {},
291 + "checkConstraints": {},
292 + "isRLSEnabled": false
293 + },
294 + "public.graders": {
295 + "name": "graders",
296 + "schema": "",
297 + "columns": {
298 + "slug": {
299 + "name": "slug",
300 + "type": "text",
301 + "primaryKey": true,
302 + "notNull": true
303 + },
304 + "name": {
305 + "name": "name",
306 + "type": "text",
307 + "primaryKey": false,
308 + "notNull": true
309 + },
310 + "category_slugs": {
311 + "name": "category_slugs",
312 + "type": "text[]",
313 + "primaryKey": false,
314 + "notNull": true,
315 + "default": "'{}'::text[]"
316 + },
317 + "scale": {
318 + "name": "scale",
319 + "type": "jsonb",
320 + "primaryKey": false,
321 + "notNull": true,
322 + "default": "'{}'::jsonb"
323 + },
324 + "population_url": {
325 + "name": "population_url",
326 + "type": "text",
327 + "primaryKey": false,
328 + "notNull": false
329 + },
330 + "verify_url": {
331 + "name": "verify_url",
332 + "type": "text",
333 + "primaryKey": false,
334 + "notNull": false
335 + },
336 + "active": {
337 + "name": "active",
338 + "type": "boolean",
339 + "primaryKey": false,
340 + "notNull": true,
341 + "default": true
342 + }
343 + },
344 + "indexes": {},
345 + "foreignKeys": {},
346 + "compositePrimaryKeys": {},
347 + "uniqueConstraints": {},
348 + "policies": {},
349 + "checkConstraints": {},
350 + "isRLSEnabled": false
351 + },
352 + "public.sets": {
353 + "name": "sets",
354 + "schema": "",
355 + "columns": {
356 + "slug": {
357 + "name": "slug",
358 + "type": "text",
359 + "primaryKey": true,
360 + "notNull": true
361 + },
362 + "name": {
363 + "name": "name",
364 + "type": "text",
365 + "primaryKey": false,
366 + "notNull": true
367 + },
368 + "code": {
369 + "name": "code",
370 + "type": "text",
371 + "primaryKey": false,
372 + "notNull": false
373 + },
374 + "category_slug": {
375 + "name": "category_slug",
376 + "type": "text",
377 + "primaryKey": false,
378 + "notNull": true
379 + },
380 + "franchise_slug": {
381 + "name": "franchise_slug",
382 + "type": "text",
383 + "primaryKey": false,
384 + "notNull": false
385 + },
386 + "brand_slug": {
387 + "name": "brand_slug",
388 + "type": "text",
389 + "primaryKey": false,
390 + "notNull": false
391 + },
392 + "release_year": {
393 + "name": "release_year",
394 + "type": "integer",
395 + "primaryKey": false,
396 + "notNull": false
397 + },
398 + "release_date": {
399 + "name": "release_date",
400 + "type": "text",
401 + "primaryKey": false,
402 + "notNull": false
403 + },
404 + "language": {
405 + "name": "language",
406 + "type": "text",
407 + "primaryKey": false,
408 + "notNull": false
409 + },
410 + "total_items": {
411 + "name": "total_items",
412 + "type": "integer",
413 + "primaryKey": false,
414 + "notNull": false
415 + },
416 + "identifiers": {
417 + "name": "identifiers",
418 + "type": "jsonb",
419 + "primaryKey": false,
420 + "notNull": true,
421 + "default": "'{}'::jsonb"
422 + },
423 + "metadata": {
424 + "name": "metadata",
425 + "type": "jsonb",
426 + "primaryKey": false,
427 + "notNull": true,
428 + "default": "'{}'::jsonb"
429 + },
430 + "created_at": {
431 + "name": "created_at",
432 + "type": "timestamp with time zone",
433 + "primaryKey": false,
434 + "notNull": true,
435 + "default": "now()"
436 + }
437 + },
438 + "indexes": {
439 + "sets_category_idx": {
440 + "name": "sets_category_idx",
441 + "columns": [
442 + {
443 + "expression": "category_slug",
444 + "isExpression": false,
445 + "asc": true,
446 + "nulls": "last"
447 + }
448 + ],
449 + "isUnique": false,
450 + "concurrently": false,
451 + "method": "btree",
452 + "with": {}
453 + },
454 + "sets_category_code_uq": {
455 + "name": "sets_category_code_uq",
456 + "columns": [
457 + {
458 + "expression": "category_slug",
459 + "isExpression": false,
460 + "asc": true,
461 + "nulls": "last"
462 + },
463 + {
464 + "expression": "code",
465 + "isExpression": false,
466 + "asc": true,
467 + "nulls": "last"
468 + }
469 + ],
470 + "isUnique": true,
471 + "concurrently": false,
472 + "method": "btree",
473 + "with": {}
474 + }
475 + },
476 + "foreignKeys": {},
477 + "compositePrimaryKeys": {},
478 + "uniqueConstraints": {},
479 + "policies": {},
480 + "checkConstraints": {},
481 + "isRLSEnabled": false
482 + },
483 + "public.taxonomy_proposals": {
484 + "name": "taxonomy_proposals",
485 + "schema": "",
486 + "columns": {
487 + "id": {
488 + "name": "id",
489 + "type": "text",
490 + "primaryKey": true,
491 + "notNull": true
492 + },
493 + "proposed_slug": {
494 + "name": "proposed_slug",
495 + "type": "text",
496 + "primaryKey": false,
497 + "notNull": true
498 + },
499 + "name": {
500 + "name": "name",
501 + "type": "text",
502 + "primaryKey": false,
503 + "notNull": true
504 + },
505 + "parent_slug": {
506 + "name": "parent_slug",
507 + "type": "text",
508 + "primaryKey": false,
509 + "notNull": false
510 + },
511 + "evidence": {
512 + "name": "evidence",
513 + "type": "jsonb",
514 + "primaryKey": false,
515 + "notNull": true,
516 + "default": "'{}'::jsonb"
517 + },
518 + "volume_estimate": {
519 + "name": "volume_estimate",
520 + "type": "integer",
521 + "primaryKey": false,
522 + "notNull": false
523 + },
524 + "status": {
525 + "name": "status",
526 + "type": "text",
527 + "primaryKey": false,
528 + "notNull": true,
529 + "default": "'pending'"
530 + },
531 + "decided_by": {
532 + "name": "decided_by",
533 + "type": "text",
534 + "primaryKey": false,
535 + "notNull": false
536 + },
537 + "decided_at": {
538 + "name": "decided_at",
539 + "type": "text",
540 + "primaryKey": false,
541 + "notNull": false
542 + },
543 + "created_at": {
544 + "name": "created_at",
545 + "type": "timestamp with time zone",
546 + "primaryKey": false,
547 + "notNull": true,
548 + "default": "now()"
549 + }
550 + },
551 + "indexes": {},
552 + "foreignKeys": {},
553 + "compositePrimaryKeys": {},
554 + "uniqueConstraints": {},
555 + "policies": {},
556 + "checkConstraints": {},
557 + "isRLSEnabled": false
558 + },
559 + "public.connector_health": {
560 + "name": "connector_health",
561 + "schema": "",
562 + "columns": {
563 + "connector_id": {
564 + "name": "connector_id",
565 + "type": "text",
566 + "primaryKey": true,
567 + "notNull": true
568 + },
569 + "computed_at": {
570 + "name": "computed_at",
571 + "type": "timestamp with time zone",
572 + "primaryKey": false,
573 + "notNull": true
574 + },
575 + "status": {
576 + "name": "status",
577 + "type": "text",
578 + "primaryKey": false,
579 + "notNull": true
580 + },
581 + "health": {
582 + "name": "health",
583 + "type": "jsonb",
584 + "primaryKey": false,
585 + "notNull": true,
586 + "default": "'{}'::jsonb"
587 + }
588 + },
589 + "indexes": {},
590 + "foreignKeys": {},
591 + "compositePrimaryKeys": {},
592 + "uniqueConstraints": {},
593 + "policies": {},
594 + "checkConstraints": {},
595 + "isRLSEnabled": false
596 + },
597 + "public.connector_runs": {
598 + "name": "connector_runs",
599 + "schema": "",
600 + "columns": {
601 + "id": {
602 + "name": "id",
603 + "type": "text",
604 + "primaryKey": true,
605 + "notNull": true
606 + },
607 + "connector_id": {
608 + "name": "connector_id",
609 + "type": "text",
610 + "primaryKey": false,
611 + "notNull": true
612 + },
613 + "trigger": {
614 + "name": "trigger",
615 + "type": "text",
616 + "primaryKey": false,
617 + "notNull": true,
618 + "default": "'schedule'"
619 + },
620 + "started_at": {
621 + "name": "started_at",
622 + "type": "timestamp with time zone",
623 + "primaryKey": false,
624 + "notNull": true
625 + },
626 + "finished_at": {
627 + "name": "finished_at",
628 + "type": "timestamp with time zone",
629 + "primaryKey": false,
630 + "notNull": false
631 + },
632 + "status": {
633 + "name": "status",
634 + "type": "text",
635 + "primaryKey": false,
636 + "notNull": true,
637 + "default": "'running'"
638 + },
639 + "pages_attempted": {
640 + "name": "pages_attempted",
641 + "type": "integer",
642 + "primaryKey": false,
643 + "notNull": true,
644 + "default": 0
645 + },
646 + "pages_success": {
647 + "name": "pages_success",
648 + "type": "integer",
649 + "primaryKey": false,
650 + "notNull": true,
651 + "default": 0
652 + },
653 + "records_raw": {
654 + "name": "records_raw",
655 + "type": "integer",
656 + "primaryKey": false,
657 + "notNull": true,
658 + "default": 0
659 + },
660 + "records_normalized": {
661 + "name": "records_normalized",
662 + "type": "integer",
663 + "primaryKey": false,
664 + "notNull": true,
665 + "default": 0
666 + },
667 + "records_duplicate": {
668 + "name": "records_duplicate",
669 + "type": "integer",
670 + "primaryKey": false,
671 + "notNull": true,
672 + "default": 0
673 + },
674 + "records_rejected": {
675 + "name": "records_rejected",
676 + "type": "integer",
677 + "primaryKey": false,
678 + "notNull": true,
679 + "default": 0
680 + },
681 + "engine_stats": {
682 + "name": "engine_stats",
683 + "type": "jsonb",
684 + "primaryKey": false,
685 + "notNull": true,
686 + "default": "'{}'::jsonb"
687 + },
688 + "anomalies": {
689 + "name": "anomalies",
690 + "type": "jsonb",
691 + "primaryKey": false,
692 + "notNull": true,
693 + "default": "'[]'::jsonb"
694 + },
695 + "error": {
696 + "name": "error",
697 + "type": "text",
698 + "primaryKey": false,
699 + "notNull": false
700 + },
701 + "cost_credits": {
702 + "name": "cost_credits",
703 + "type": "real",
704 + "primaryKey": false,
705 + "notNull": true,
706 + "default": 0
707 + },
708 + "cost_usd_est": {
709 + "name": "cost_usd_est",
710 + "type": "real",
711 + "primaryKey": false,
712 + "notNull": true,
713 + "default": 0
714 + },
715 + "cursor": {
716 + "name": "cursor",
717 + "type": "jsonb",
718 + "primaryKey": false,
719 + "notNull": true,
720 + "default": "'{}'::jsonb"
721 + }
722 + },
723 + "indexes": {
724 + "connector_runs_connector_started_idx": {
725 + "name": "connector_runs_connector_started_idx",
726 + "columns": [
727 + {
728 + "expression": "connector_id",
729 + "isExpression": false,
730 + "asc": true,
731 + "nulls": "last"
732 + },
733 + {
734 + "expression": "started_at",
735 + "isExpression": false,
736 + "asc": true,
737 + "nulls": "last"
738 + }
739 + ],
740 + "isUnique": false,
741 + "concurrently": false,
742 + "method": "btree",
743 + "with": {}
744 + }
745 + },
746 + "foreignKeys": {},
747 + "compositePrimaryKeys": {},
748 + "uniqueConstraints": {},
749 + "policies": {},
750 + "checkConstraints": {},
751 + "isRLSEnabled": false
752 + },
753 + "public.connectors": {
754 + "name": "connectors",
755 + "schema": "",
756 + "columns": {
757 + "id": {
758 + "name": "id",
759 + "type": "text",
760 + "primaryKey": true,
761 + "notNull": true
762 + },
763 + "source_id": {
764 + "name": "source_id",
765 + "type": "text",
766 + "primaryKey": false,
767 + "notNull": true
768 + },
769 + "display_name": {
770 + "name": "display_name",
771 + "type": "text",
772 + "primaryKey": false,
773 + "notNull": true
774 + },
775 + "engine_priority": {
776 + "name": "engine_priority",
777 + "type": "text[]",
778 + "primaryKey": false,
779 + "notNull": true,
780 + "default": "'{}'::text[]"
781 + },
782 + "categories": {
783 + "name": "categories",
784 + "type": "text[]",
785 + "primaryKey": false,
786 + "notNull": true,
787 + "default": "'{}'::text[]"
788 + },
789 + "regions": {
790 + "name": "regions",
791 + "type": "text[]",
792 + "primaryKey": false,
793 + "notNull": true,
794 + "default": "'{}'::text[]"
795 + },
796 + "languages": {
797 + "name": "languages",
798 + "type": "text[]",
799 + "primaryKey": false,
800 + "notNull": true,
801 + "default": "'{}'::text[]"
802 + },
803 + "currency": {
804 + "name": "currency",
805 + "type": "text[]",
806 + "primaryKey": false,
807 + "notNull": true,
808 + "default": "'{}'::text[]"
809 + },
810 + "supports_listings": {
811 + "name": "supports_listings",
812 + "type": "boolean",
813 + "primaryKey": false,
814 + "notNull": true,
815 + "default": false
816 + },
817 + "supports_sold": {
818 + "name": "supports_sold",
819 + "type": "boolean",
820 + "primaryKey": false,
821 + "notNull": true,
822 + "default": false
823 + },
824 + "supports_auctions": {
825 + "name": "supports_auctions",
826 + "type": "boolean",
827 + "primaryKey": false,
828 + "notNull": true,
829 + "default": false
830 + },
831 + "supports_images": {
832 + "name": "supports_images",
833 + "type": "boolean",
834 + "primaryKey": false,
835 + "notNull": true,
836 + "default": true
837 + },
838 + "supports_catalog": {
839 + "name": "supports_catalog",
840 + "type": "boolean",
841 + "primaryKey": false,
842 + "notNull": true,
843 + "default": false
844 + },
845 + "supports_population": {
846 + "name": "supports_population",
847 + "type": "boolean",
848 + "primaryKey": false,
849 + "notNull": true,
850 + "default": false
851 + },
852 + "refresh_frequency_minutes": {
853 + "name": "refresh_frequency_minutes",
854 + "type": "integer",
855 + "primaryKey": false,
856 + "notNull": true,
857 + "default": 1440
858 + },
859 + "priority": {
860 + "name": "priority",
861 + "type": "text",
862 + "primaryKey": false,
863 + "notNull": true,
864 + "default": "'medium'"
865 + },
866 + "status": {
867 + "name": "status",
868 + "type": "text",
869 + "primaryKey": false,
870 + "notNull": true,
871 + "default": "'active'"
872 + },
873 + "schema_version": {
874 + "name": "schema_version",
875 + "type": "text",
876 + "primaryKey": false,
877 + "notNull": true,
878 + "default": "'1.0'"
879 + },
880 + "connector_version": {
881 + "name": "connector_version",
882 + "type": "text",
883 + "primaryKey": false,
884 + "notNull": true,
885 + "default": "'1.0.0'"
886 + },
887 + "config": {
888 + "name": "config",
889 + "type": "jsonb",
890 + "primaryKey": false,
891 + "notNull": true,
892 + "default": "'{}'::jsonb"
893 + },
894 + "last_run_at": {
895 + "name": "last_run_at",
896 + "type": "timestamp with time zone",
897 + "primaryKey": false,
898 + "notNull": false
899 + },
900 + "last_success_at": {
901 + "name": "last_success_at",
902 + "type": "timestamp with time zone",
903 + "primaryKey": false,
904 + "notNull": false
905 + },
906 + "next_run_at": {
907 + "name": "next_run_at",
908 + "type": "timestamp with time zone",
909 + "primaryKey": false,
910 + "notNull": false
911 + },
912 + "created_at": {
913 + "name": "created_at",
914 + "type": "timestamp with time zone",
915 + "primaryKey": false,
916 + "notNull": true,
917 + "default": "now()"
918 + },
919 + "updated_at": {
920 + "name": "updated_at",
921 + "type": "timestamp with time zone",
922 + "primaryKey": false,
923 + "notNull": true,
924 + "default": "now()"
925 + }
926 + },
927 + "indexes": {},
928 + "foreignKeys": {},
929 + "compositePrimaryKeys": {},
930 + "uniqueConstraints": {},
931 + "policies": {},
932 + "checkConstraints": {},
933 + "isRLSEnabled": false
934 + },
935 + "public.costs": {
936 + "name": "costs",
937 + "schema": "",
938 + "columns": {
939 + "id": {
940 + "name": "id",
941 + "type": "text",
942 + "primaryKey": true,
943 + "notNull": true
944 + },
945 + "occurred_at": {
946 + "name": "occurred_at",
947 + "type": "timestamp with time zone",
948 + "primaryKey": false,
949 + "notNull": true
950 + },
951 + "kind": {
952 + "name": "kind",
953 + "type": "text",
954 + "primaryKey": false,
955 + "notNull": true
956 + },
957 + "provider": {
958 + "name": "provider",
959 + "type": "text",
960 + "primaryKey": false,
961 + "notNull": false
962 + },
963 + "connector_id": {
964 + "name": "connector_id",
965 + "type": "text",
966 + "primaryKey": false,
967 + "notNull": false
968 + },
969 + "category_slug": {
970 + "name": "category_slug",
971 + "type": "text",
972 + "primaryKey": false,
973 + "notNull": false
974 + },
975 + "endpoint": {
976 + "name": "endpoint",
977 + "type": "text",
978 + "primaryKey": false,
979 + "notNull": false
980 + },
981 + "user_id": {
982 + "name": "user_id",
983 + "type": "text",
984 + "primaryKey": false,
985 + "notNull": false
986 + },
987 + "units": {
988 + "name": "units",
989 + "type": "real",
990 + "primaryKey": false,
991 + "notNull": true,
992 + "default": 1
993 + },
994 + "credits": {
995 + "name": "credits",
996 + "type": "real",
997 + "primaryKey": false,
998 + "notNull": true,
999 + "default": 0
1000 + },
1001 + "usd_est": {
1002 + "name": "usd_est",
1003 + "type": "real",
1004 + "primaryKey": false,
1005 + "notNull": true,
1006 + "default": 0
1007 + },
1008 + "metadata": {
1009 + "name": "metadata",
1010 + "type": "jsonb",
1011 + "primaryKey": false,
1012 + "notNull": true,
1013 + "default": "'{}'::jsonb"
1014 + }
1015 + },
1016 + "indexes": {
1017 + "costs_occurred_idx": {
1018 + "name": "costs_occurred_idx",
1019 + "columns": [
1020 + {
1021 + "expression": "occurred_at",
1022 + "isExpression": false,
1023 + "asc": true,
1024 + "nulls": "last"
1025 + }
1026 + ],
1027 + "isUnique": false,
1028 + "concurrently": false,
1029 + "method": "btree",
1030 + "with": {}
1031 + },
1032 + "costs_connector_idx": {
1033 + "name": "costs_connector_idx",
1034 + "columns": [
1035 + {
1036 + "expression": "connector_id",
1037 + "isExpression": false,
1038 + "asc": true,
1039 + "nulls": "last"
1040 + }
1041 + ],
1042 + "isUnique": false,
1043 + "concurrently": false,
1044 + "method": "btree",
1045 + "with": {}
1046 + }
1047 + },
1048 + "foreignKeys": {},
1049 + "compositePrimaryKeys": {},
1050 + "uniqueConstraints": {},
1051 + "policies": {},
1052 + "checkConstraints": {},
1053 + "isRLSEnabled": false
1054 + },
1055 + "public.crawl_state": {
1056 + "name": "crawl_state",
1057 + "schema": "",
1058 + "columns": {
1059 + "url_hash": {
1060 + "name": "url_hash",
1061 + "type": "text",
1062 + "primaryKey": true,
1063 + "notNull": true
1064 + },
1065 + "connector_id": {
1066 + "name": "connector_id",
1067 + "type": "text",
1068 + "primaryKey": false,
1069 + "notNull": true
1070 + },
1071 + "url": {
1072 + "name": "url",
1073 + "type": "text",
1074 + "primaryKey": false,
1075 + "notNull": true
1076 + },
1077 + "etag": {
1078 + "name": "etag",
1079 + "type": "text",
1080 + "primaryKey": false,
1081 + "notNull": false
1082 + },
1083 + "last_modified": {
1084 + "name": "last_modified",
1085 + "type": "text",
1086 + "primaryKey": false,
1087 + "notNull": false
1088 + },
1089 + "content_hash": {
1090 + "name": "content_hash",
1091 + "type": "text",
1092 + "primaryKey": false,
1093 + "notNull": false
1094 + },
1095 + "last_fetched_at": {
1096 + "name": "last_fetched_at",
1097 + "type": "timestamp with time zone",
1098 + "primaryKey": false,
1099 + "notNull": false
1100 + },
1101 + "last_changed_at": {
1102 + "name": "last_changed_at",
1103 + "type": "timestamp with time zone",
1104 + "primaryKey": false,
1105 + "notNull": false
1106 + },
1107 + "fetch_count": {
1108 + "name": "fetch_count",
1109 + "type": "integer",
1110 + "primaryKey": false,
1111 + "notNull": true,
1112 + "default": 0
1113 + },
1114 + "change_count": {
1115 + "name": "change_count",
1116 + "type": "integer",
1117 + "primaryKey": false,
1118 + "notNull": true,
1119 + "default": 0
1120 + },
1121 + "change_interval_hours": {
1122 + "name": "change_interval_hours",
1123 + "type": "real",
1124 + "primaryKey": false,
1125 + "notNull": false
1126 + },
1127 + "next_fetch_at": {
1128 + "name": "next_fetch_at",
1129 + "type": "timestamp with time zone",
1130 + "primaryKey": false,
1131 + "notNull": false
1132 + },
1133 + "last_status": {
1134 + "name": "last_status",
1135 + "type": "integer",
1136 + "primaryKey": false,
1137 + "notNull": false
1138 + },
1139 + "failures": {
1140 + "name": "failures",
1141 + "type": "integer",
1142 + "primaryKey": false,
1143 + "notNull": true,
1144 + "default": 0
1145 + }
1146 + },
1147 + "indexes": {
1148 + "crawl_state_next_idx": {
1149 + "name": "crawl_state_next_idx",
1150 + "columns": [
1151 + {
1152 + "expression": "connector_id",
1153 + "isExpression": false,
1154 + "asc": true,
1155 + "nulls": "last"
1156 + },
1157 + {
1158 + "expression": "next_fetch_at",
1159 + "isExpression": false,
1160 + "asc": true,
1161 + "nulls": "last"
1162 + }
1163 + ],
1164 + "isUnique": false,
1165 + "concurrently": false,
1166 + "method": "btree",
1167 + "with": {}
1168 + }
1169 + },
1170 + "foreignKeys": {},
1171 + "compositePrimaryKeys": {},
1172 + "uniqueConstraints": {},
1173 + "policies": {},
1174 + "checkConstraints": {},
1175 + "isRLSEnabled": false
1176 + },
1177 + "public.sources": {
1178 + "name": "sources",
1179 + "schema": "",
1180 + "columns": {
1181 + "id": {
1182 + "name": "id",
1183 + "type": "text",
1184 + "primaryKey": true,
1185 + "notNull": true
1186 + },
1187 + "name": {
1188 + "name": "name",
1189 + "type": "text",
1190 + "primaryKey": false,
1191 + "notNull": true
1192 + },
1193 + "source_type": {
1194 + "name": "source_type",
1195 + "type": "text",
1196 + "primaryKey": false,
1197 + "notNull": true
1198 + },
1199 + "url": {
1200 + "name": "url",
1201 + "type": "text",
1202 + "primaryKey": false,
1203 + "notNull": false
1204 + },
1205 + "countries": {
1206 + "name": "countries",
1207 + "type": "text[]",
1208 + "primaryKey": false,
1209 + "notNull": true,
1210 + "default": "'{}'::text[]"
1211 + },
1212 + "languages": {
1213 + "name": "languages",
1214 + "type": "text[]",
1215 + "primaryKey": false,
1216 + "notNull": true,
1217 + "default": "'{}'::text[]"
1218 + },
1219 + "currencies": {
1220 + "name": "currencies",
1221 + "type": "text[]",
1222 + "primaryKey": false,
1223 + "notNull": true,
1224 + "default": "'{}'::text[]"
1225 + },
1226 + "trust_score": {
1227 + "name": "trust_score",
1228 + "type": "numeric(8, 6)",
1229 + "primaryKey": false,
1230 + "notNull": true,
1231 + "default": 0.5
1232 + },
1233 + "trust_factors": {
1234 + "name": "trust_factors",
1235 + "type": "jsonb",
1236 + "primaryKey": false,
1237 + "notNull": true,
1238 + "default": "'{}'::jsonb"
1239 + },
1240 + "attribution_required": {
1241 + "name": "attribution_required",
1242 + "type": "boolean",
1243 + "primaryKey": false,
1244 + "notNull": true,
1245 + "default": true
1246 + },
1247 + "terms_url": {
1248 + "name": "terms_url",
1249 + "type": "text",
1250 + "primaryKey": false,
1251 + "notNull": false
1252 + },
1253 + "active": {
1254 + "name": "active",
1255 + "type": "boolean",
1256 + "primaryKey": false,
1257 + "notNull": true,
1258 + "default": true
1259 + },
1260 + "created_at": {
1261 + "name": "created_at",
1262 + "type": "timestamp with time zone",
1263 + "primaryKey": false,
1264 + "notNull": true,
1265 + "default": "now()"
1266 + },
1267 + "updated_at": {
1268 + "name": "updated_at",
1269 + "type": "timestamp with time zone",
1270 + "primaryKey": false,
1271 + "notNull": true,
1272 + "default": "now()"
1273 + }
1274 + },
1275 + "indexes": {},
1276 + "foreignKeys": {},
1277 + "compositePrimaryKeys": {},
1278 + "uniqueConstraints": {},
1279 + "policies": {},
1280 + "checkConstraints": {},
1281 + "isRLSEnabled": false
1282 + },
1283 + "public.audit_log": {
1284 + "name": "audit_log",
1285 + "schema": "",
1286 + "columns": {
1287 + "id": {
1288 + "name": "id",
1289 + "type": "text",
1290 + "primaryKey": true,
1291 + "notNull": true
1292 + },
1293 + "entity_type": {
1294 + "name": "entity_type",
1295 + "type": "text",
1296 + "primaryKey": false,
1297 + "notNull": true
1298 + },
1299 + "entity_id": {
1300 + "name": "entity_id",
1301 + "type": "text",
1302 + "primaryKey": false,
1303 + "notNull": true
1304 + },
1305 + "action": {
1306 + "name": "action",
1307 + "type": "text",
1308 + "primaryKey": false,
1309 + "notNull": true
1310 + },
1311 + "reason": {
1312 + "name": "reason",
1313 + "type": "text",
1314 + "primaryKey": false,
1315 + "notNull": true
1316 + },
1317 + "actor": {
1318 + "name": "actor",
1319 + "type": "text",
1320 + "primaryKey": false,
1321 + "notNull": true,
1322 + "default": "'system'"
1323 + },
1324 + "details": {
1325 + "name": "details",
1326 + "type": "jsonb",
1327 + "primaryKey": false,
1328 + "notNull": true,
1329 + "default": "'{}'::jsonb"
1330 + },
1331 + "created_at": {
1332 + "name": "created_at",
1333 + "type": "timestamp with time zone",
1334 + "primaryKey": false,
1335 + "notNull": true,
1336 + "default": "now()"
1337 + }
1338 + },
1339 + "indexes": {
1340 + "audit_entity_idx": {
1341 + "name": "audit_entity_idx",
1342 + "columns": [
1343 + {
1344 + "expression": "entity_type",
1345 + "isExpression": false,
1346 + "asc": true,
1347 + "nulls": "last"
1348 + },
1349 + {
1350 + "expression": "entity_id",
1351 + "isExpression": false,
1352 + "asc": true,
1353 + "nulls": "last"
1354 + }
1355 + ],
1356 + "isUnique": false,
1357 + "concurrently": false,
1358 + "method": "btree",
1359 + "with": {}
1360 + }
1361 + },
1362 + "foreignKeys": {},
1363 + "compositePrimaryKeys": {},
1364 + "uniqueConstraints": {},
1365 + "policies": {},
1366 + "checkConstraints": {},
1367 + "isRLSEnabled": false
1368 + },
1369 + "public.events": {
1370 + "name": "events",
1371 + "schema": "",
1372 + "columns": {
1373 + "id": {
1374 + "name": "id",
1375 + "type": "text",
1376 + "primaryKey": true,
1377 + "notNull": true
1378 + },
1379 + "type": {
1380 + "name": "type",
1381 + "type": "text",
1382 + "primaryKey": false,
1383 + "notNull": true
1384 + },
1385 + "entity_type": {
1386 + "name": "entity_type",
1387 + "type": "text",
1388 + "primaryKey": false,
1389 + "notNull": false
1390 + },
1391 + "entity_id": {
1392 + "name": "entity_id",
1393 + "type": "text",
1394 + "primaryKey": false,
1395 + "notNull": false
1396 + },
1397 + "payload": {
1398 + "name": "payload",
1399 + "type": "jsonb",
1400 + "primaryKey": false,
1401 + "notNull": true,
1402 + "default": "'{}'::jsonb"
1403 + },
1404 + "created_at": {
1405 + "name": "created_at",
1406 + "type": "timestamp with time zone",
1407 + "primaryKey": false,
1408 + "notNull": true,
1409 + "default": "now()"
1410 + }
1411 + },
1412 + "indexes": {
1413 + "events_type_created_idx": {
1414 + "name": "events_type_created_idx",
1415 + "columns": [
1416 + {
1417 + "expression": "type",
1418 + "isExpression": false,
1419 + "asc": true,
1420 + "nulls": "last"
1421 + },
1422 + {
1423 + "expression": "created_at",
1424 + "isExpression": false,
1425 + "asc": true,
1426 + "nulls": "last"
1427 + }
1428 + ],
1429 + "isUnique": false,
1430 + "concurrently": false,
1431 + "method": "btree",
1432 + "with": {}
1433 + },
1434 + "events_entity_idx": {
1435 + "name": "events_entity_idx",
1436 + "columns": [
1437 + {
1438 + "expression": "entity_type",
1439 + "isExpression": false,
1440 + "asc": true,
1441 + "nulls": "last"
1442 + },
1443 + {
1444 + "expression": "entity_id",
1445 + "isExpression": false,
1446 + "asc": true,
1447 + "nulls": "last"
1448 + }
1449 + ],
1450 + "isUnique": false,
1451 + "concurrently": false,
1452 + "method": "btree",
1453 + "with": {}
1454 + }
1455 + },
1456 + "foreignKeys": {},
1457 + "compositePrimaryKeys": {},
1458 + "uniqueConstraints": {},
1459 + "policies": {},
1460 + "checkConstraints": {},
1461 + "isRLSEnabled": false
1462 + },
1463 + "public.normalized_records": {
1464 + "name": "normalized_records",
1465 + "schema": "",
1466 + "columns": {
1467 + "id": {
1468 + "name": "id",
1469 + "type": "text",
1470 + "primaryKey": true,
1471 + "notNull": true
1472 + },
1473 + "raw_record_id": {
1474 + "name": "raw_record_id",
1475 + "type": "text",
1476 + "primaryKey": false,
1477 + "notNull": true
1478 + },
1479 + "connector_id": {
1480 + "name": "connector_id",
1481 + "type": "text",
1482 + "primaryKey": false,
1483 + "notNull": true
1484 + },
1485 + "source_id": {
1486 + "name": "source_id",
1487 + "type": "text",
1488 + "primaryKey": false,
1489 + "notNull": true
1490 + },
1491 + "kind": {
1492 + "name": "kind",
1493 + "type": "text",
1494 + "primaryKey": false,
1495 + "notNull": true
1496 + },
1497 + "payload": {
1498 + "name": "payload",
1499 + "type": "jsonb",
1500 + "primaryKey": false,
1501 + "notNull": true
1502 + },
1503 + "seq": {
1504 + "name": "seq",
1505 + "type": "integer",
1506 + "primaryKey": false,
1507 + "notNull": true,
1508 + "default": 0
1509 + },
1510 + "asset_id": {
1511 + "name": "asset_id",
1512 + "type": "text",
1513 + "primaryKey": false,
1514 + "notNull": false
1515 + },
1516 + "variant_id": {
1517 + "name": "variant_id",
1518 + "type": "text",
1519 + "primaryKey": false,
1520 + "notNull": false
1521 + },
1522 + "match_method": {
1523 + "name": "match_method",
1524 + "type": "text",
1525 + "primaryKey": false,
1526 + "notNull": false
1527 + },
1528 + "match_confidence": {
1529 + "name": "match_confidence",
1530 + "type": "numeric(8, 6)",
1531 + "primaryKey": false,
1532 + "notNull": false
1533 + },
1534 + "status": {
1535 + "name": "status",
1536 + "type": "text",
1537 + "primaryKey": false,
1538 + "notNull": true,
1539 + "default": "'pending'"
1540 + },
1541 + "reject_reason": {
1542 + "name": "reject_reason",
1543 + "type": "text",
1544 + "primaryKey": false,
1545 + "notNull": false
1546 + },
1547 + "target_id": {
1548 + "name": "target_id",
1549 + "type": "text",
1550 + "primaryKey": false,
1551 + "notNull": false
1552 + },
1553 + "created_at": {
1554 + "name": "created_at",
1555 + "type": "timestamp with time zone",
1556 + "primaryKey": false,
1557 + "notNull": true,
1558 + "default": "now()"
1559 + },
1560 + "processed_at": {
1561 + "name": "processed_at",
1562 + "type": "timestamp with time zone",
1563 + "primaryKey": false,
1564 + "notNull": false
1565 + }
1566 + },
1567 + "indexes": {
1568 + "normalized_records_status_idx": {
1569 + "name": "normalized_records_status_idx",
1570 + "columns": [
1571 + {
1572 + "expression": "status",
1573 + "isExpression": false,
1574 + "asc": true,
1575 + "nulls": "last"
1576 + },
1577 + {
1578 + "expression": "created_at",
1579 + "isExpression": false,
1580 + "asc": true,
1581 + "nulls": "last"
1582 + }
1583 + ],
1584 + "isUnique": false,
1585 + "concurrently": false,
1586 + "method": "btree",
1587 + "with": {}
1588 + },
1589 + "normalized_records_status_kind_idx": {
1590 + "name": "normalized_records_status_kind_idx",
1591 + "columns": [
1592 + {
1593 + "expression": "status",
1594 + "isExpression": false,
1595 + "asc": true,
1596 + "nulls": "last"
1597 + },
1598 + {
1599 + "expression": "kind",
1600 + "isExpression": false,
1601 + "asc": true,
1602 + "nulls": "last"
1603 + },
1604 + {
1605 + "expression": "created_at",
1606 + "isExpression": false,
1607 + "asc": true,
1608 + "nulls": "last"
1609 + }
1610 + ],
1611 + "isUnique": false,
1612 + "concurrently": false,
1613 + "method": "btree",
1614 + "with": {}
1615 + },
1616 + "normalized_records_asset_idx": {
1617 + "name": "normalized_records_asset_idx",
1618 + "columns": [
1619 + {
1620 + "expression": "asset_id",
1621 + "isExpression": false,
1622 + "asc": true,
1623 + "nulls": "last"
1624 + }
1625 + ],
1626 + "isUnique": false,
1627 + "concurrently": false,
1628 + "method": "btree",
1629 + "with": {}
1630 + },
1631 + "normalized_records_raw_uq": {
1632 + "name": "normalized_records_raw_uq",
1633 + "columns": [
1634 + {
1635 + "expression": "raw_record_id",
1636 + "isExpression": false,
1637 + "asc": true,
1638 + "nulls": "last"
1639 + },
1640 + {
1641 + "expression": "kind",
1642 + "isExpression": false,
1643 + "asc": true,
1644 + "nulls": "last"
1645 + },
1646 + {
1647 + "expression": "seq",
1648 + "isExpression": false,
1649 + "asc": true,
1650 + "nulls": "last"
1651 + }
1652 + ],
1653 + "isUnique": true,
1654 + "concurrently": false,
1655 + "method": "btree",
1656 + "with": {}
1657 + }
1658 + },
1659 + "foreignKeys": {},
1660 + "compositePrimaryKeys": {},
1661 + "uniqueConstraints": {},
1662 + "policies": {},
1663 + "checkConstraints": {},
1664 + "isRLSEnabled": false
1665 + },
1666 + "public.raw_records": {
1667 + "name": "raw_records",
1668 + "schema": "",
1669 + "columns": {
1670 + "id": {
1671 + "name": "id",
1672 + "type": "text",
1673 + "primaryKey": true,
1674 + "notNull": true
1675 + },
1676 + "connector_id": {
1677 + "name": "connector_id",
1678 + "type": "text",
1679 + "primaryKey": false,
1680 + "notNull": true
1681 + },
1682 + "source_id": {
1683 + "name": "source_id",
1684 + "type": "text",
1685 + "primaryKey": false,
1686 + "notNull": true
1687 + },
1688 + "run_id": {
1689 + "name": "run_id",
1690 + "type": "text",
1691 + "primaryKey": false,
1692 + "notNull": false
1693 + },
1694 + "engine": {
1695 + "name": "engine",
1696 + "type": "text",
1697 + "primaryKey": false,
1698 + "notNull": true
1699 + },
1700 + "url": {
1701 + "name": "url",
1702 + "type": "text",
1703 + "primaryKey": false,
1704 + "notNull": true
1705 + },
1706 + "external_id": {
1707 + "name": "external_id",
1708 + "type": "text",
1709 + "primaryKey": false,
1710 + "notNull": false
1711 + },
1712 + "kind": {
1713 + "name": "kind",
1714 + "type": "text",
1715 + "primaryKey": false,
1716 + "notNull": true
1717 + },
1718 + "fetched_at": {
1719 + "name": "fetched_at",
1720 + "type": "timestamp with time zone",
1721 + "primaryKey": false,
1722 + "notNull": true
1723 + },
1724 + "content_hash": {
1725 + "name": "content_hash",
1726 + "type": "text",
1727 + "primaryKey": false,
1728 + "notNull": true
1729 + },
1730 + "http_status": {
1731 + "name": "http_status",
1732 + "type": "integer",
1733 + "primaryKey": false,
1734 + "notNull": false
1735 + },
1736 + "payload": {
1737 + "name": "payload",
1738 + "type": "jsonb",
1739 + "primaryKey": false,
1740 + "notNull": true
1741 + },
1742 + "snapshot_ref": {
1743 + "name": "snapshot_ref",
1744 + "type": "text",
1745 + "primaryKey": false,
1746 + "notNull": false
1747 + },
1748 + "parser_version": {
1749 + "name": "parser_version",
1750 + "type": "text",
1751 + "primaryKey": false,
1752 + "notNull": true
1753 + },
1754 + "connector_version": {
1755 + "name": "connector_version",
1756 + "type": "text",
1757 + "primaryKey": false,
1758 + "notNull": true
1759 + },
1760 + "processed_at": {
1761 + "name": "processed_at",
1762 + "type": "timestamp with time zone",
1763 + "primaryKey": false,
1764 + "notNull": false
1765 + },
1766 + "process_error": {
1767 + "name": "process_error",
1768 + "type": "text",
1769 + "primaryKey": false,
1770 + "notNull": false
1771 + },
1772 + "created_at": {
1773 + "name": "created_at",
1774 + "type": "timestamp with time zone",
1775 + "primaryKey": false,
1776 + "notNull": true,
1777 + "default": "now()"
1778 + }
1779 + },
1780 + "indexes": {
1781 + "raw_records_connector_hash_uq": {
1782 + "name": "raw_records_connector_hash_uq",
1783 + "columns": [
1784 + {
1785 + "expression": "connector_id",
1786 + "isExpression": false,
1787 + "asc": true,
1788 + "nulls": "last"
1789 + },
1790 + {
1791 + "expression": "content_hash",
1792 + "isExpression": false,
1793 + "asc": true,
1794 + "nulls": "last"
1795 + }
1796 + ],
1797 + "isUnique": true,
1798 + "concurrently": false,
1799 + "method": "btree",
1800 + "with": {}
1801 + },
1802 + "raw_records_connector_fetched_idx": {
1803 + "name": "raw_records_connector_fetched_idx",
1804 + "columns": [
1805 + {
1806 + "expression": "connector_id",
1807 + "isExpression": false,
1808 + "asc": true,
1809 + "nulls": "last"
1810 + },
1811 + {
1812 + "expression": "fetched_at",
1813 + "isExpression": false,
1814 + "asc": true,
1815 + "nulls": "last"
1816 + }
1817 + ],
1818 + "isUnique": false,
1819 + "concurrently": false,
1820 + "method": "btree",
1821 + "with": {}
1822 + },
1823 + "raw_records_unprocessed_idx": {
1824 + "name": "raw_records_unprocessed_idx",
1825 + "columns": [
1826 + {
1827 + "expression": "processed_at",
1828 + "isExpression": false,
1829 + "asc": true,
1830 + "nulls": "last"
1831 + }
1832 + ],
1833 + "isUnique": false,
1834 + "concurrently": false,
1835 + "method": "btree",
1836 + "with": {}
1837 + },
1838 + "raw_records_external_idx": {
1839 + "name": "raw_records_external_idx",
1840 + "columns": [
1841 + {
1842 + "expression": "connector_id",
1843 + "isExpression": false,
1844 + "asc": true,
1845 + "nulls": "last"
1846 + },
1847 + {
1848 + "expression": "external_id",
1849 + "isExpression": false,
1850 + "asc": true,
1851 + "nulls": "last"
1852 + }
1853 + ],
1854 + "isUnique": false,
1855 + "concurrently": false,
1856 + "method": "btree",
1857 + "with": {}
1858 + }
1859 + },
1860 + "foreignKeys": {},
1861 + "compositePrimaryKeys": {},
1862 + "uniqueConstraints": {},
1863 + "policies": {},
1864 + "checkConstraints": {},
1865 + "isRLSEnabled": false
1866 + },
1867 + "public.asset_embeddings": {
1868 + "name": "asset_embeddings",
1869 + "schema": "",
1870 + "columns": {
1871 + "asset_id": {
1872 + "name": "asset_id",
1873 + "type": "text",
1874 + "primaryKey": true,
1875 + "notNull": true
1876 + },
1877 + "model": {
1878 + "name": "model",
1879 + "type": "text",
1880 + "primaryKey": false,
1881 + "notNull": true
1882 + },
1883 + "embedding": {
1884 + "name": "embedding",
1885 + "type": "vector(1536)",
1886 + "primaryKey": false,
1887 + "notNull": true
1888 + },
1889 + "updated_at": {
1890 + "name": "updated_at",
1891 + "type": "timestamp with time zone",
1892 + "primaryKey": false,
1893 + "notNull": true,
1894 + "default": "now()"
1895 + }
1896 + },
1897 + "indexes": {},
1898 + "foreignKeys": {},
1899 + "compositePrimaryKeys": {},
1900 + "uniqueConstraints": {},
1901 + "policies": {},
1902 + "checkConstraints": {},
1903 + "isRLSEnabled": false
1904 + },
1905 + "public.asset_stats": {
1906 + "name": "asset_stats",
1907 + "schema": "",
1908 + "columns": {
1909 + "asset_id": {
1910 + "name": "asset_id",
1911 + "type": "text",
1912 + "primaryKey": true,
1913 + "notNull": true
1914 + },
1915 + "riv_usd": {
1916 + "name": "riv_usd",
1917 + "type": "numeric(18, 4)",
1918 + "primaryKey": false,
1919 + "notNull": false
1920 + },
1921 + "riv_low_usd": {
1922 + "name": "riv_low_usd",
1923 + "type": "numeric(18, 4)",
1924 + "primaryKey": false,
1925 + "notNull": false
1926 + },
1927 + "riv_high_usd": {
1928 + "name": "riv_high_usd",
1929 + "type": "numeric(18, 4)",
1930 + "primaryKey": false,
1931 + "notNull": false
1932 + },
1933 + "riv_confidence": {
1934 + "name": "riv_confidence",
1935 + "type": "numeric(8, 6)",
1936 + "primaryKey": false,
1937 + "notNull": false
1938 + },
1939 + "riv_sample_size": {
1940 + "name": "riv_sample_size",
1941 + "type": "integer",
1942 + "primaryKey": false,
1943 + "notNull": true,
1944 + "default": 0
1945 + },
1946 + "riv_variant_id": {
1947 + "name": "riv_variant_id",
1948 + "type": "text",
1949 + "primaryKey": false,
1950 + "notNull": false
1951 + },
1952 + "latest_sale_usd": {
1953 + "name": "latest_sale_usd",
1954 + "type": "numeric(18, 4)",
1955 + "primaryKey": false,
1956 + "notNull": false
1957 + },
1958 + "latest_sale_at": {
1959 + "name": "latest_sale_at",
1960 + "type": "timestamp with time zone",
1961 + "primaryKey": false,
1962 + "notNull": false
1963 + },
1964 + "change_1d": {
1965 + "name": "change_1d",
1966 + "type": "numeric(8, 6)",
1967 + "primaryKey": false,
1968 + "notNull": false
1969 + },
1970 + "change_7d": {
1971 + "name": "change_7d",
1972 + "type": "numeric(8, 6)",
1973 + "primaryKey": false,
1974 + "notNull": false
1975 + },
1976 + "change_30d": {
1977 + "name": "change_30d",
1978 + "type": "numeric(8, 6)",
1979 + "primaryKey": false,
1980 + "notNull": false
1981 + },
1982 + "change_90d": {
1983 + "name": "change_90d",
1984 + "type": "numeric(8, 6)",
1985 + "primaryKey": false,
1986 + "notNull": false
1987 + },
1988 + "change_1y": {
1989 + "name": "change_1y",
1990 + "type": "numeric(8, 6)",
1991 + "primaryKey": false,
1992 + "notNull": false
1993 + },
1994 + "ath_usd": {
1995 + "name": "ath_usd",
1996 + "type": "numeric(18, 4)",
1997 + "primaryKey": false,
1998 + "notNull": false
1999 + },
2000 + "ath_at": {
2001 + "name": "ath_at",
2002 + "type": "timestamp with time zone",
2003 + "primaryKey": false,
2004 + "notNull": false
2005 + },
2006 + "atl_usd": {
2007 + "name": "atl_usd",
2008 + "type": "numeric(18, 4)",
2009 + "primaryKey": false,
2010 + "notNull": false
2011 + },
2012 + "atl_at": {
2013 + "name": "atl_at",
2014 + "type": "timestamp with time zone",
2015 + "primaryKey": false,
2016 + "notNull": false
2017 + },
2018 + "sales_count": {
2019 + "name": "sales_count",
2020 + "type": "integer",
2021 + "primaryKey": false,
2022 + "notNull": true,
2023 + "default": 0
2024 + },
2025 + "sales_30d": {
2026 + "name": "sales_30d",
2027 + "type": "integer",
2028 + "primaryKey": false,
2029 + "notNull": true,
2030 + "default": 0
2031 + },
2032 + "sales_1y": {
2033 + "name": "sales_1y",
2034 + "type": "integer",
2035 + "primaryKey": false,
2036 + "notNull": true,
2037 + "default": 0
2038 + },
2039 + "volume_30d_usd": {
2040 + "name": "volume_30d_usd",
2041 + "type": "numeric(18, 4)",
2042 + "primaryKey": false,
2043 + "notNull": false
2044 + },
2045 + "active_listings": {
2046 + "name": "active_listings",
2047 + "type": "integer",
2048 + "primaryKey": false,
2049 + "notNull": true,
2050 + "default": 0
2051 + },
2052 + "min_ask_usd": {
2053 + "name": "min_ask_usd",
2054 + "type": "numeric(18, 4)",
2055 + "primaryKey": false,
2056 + "notNull": false
2057 + },
2058 + "observations_count": {
2059 + "name": "observations_count",
2060 + "type": "integer",
2061 + "primaryKey": false,
2062 + "notNull": true,
2063 + "default": 0
2064 + },
2065 + "sources_count": {
2066 + "name": "sources_count",
2067 + "type": "integer",
2068 + "primaryKey": false,
2069 + "notNull": true,
2070 + "default": 0
2071 + },
2072 + "liquidity_score": {
2073 + "name": "liquidity_score",
2074 + "type": "real",
2075 + "primaryKey": false,
2076 + "notNull": false
2077 + },
2078 + "rarity_score": {
2079 + "name": "rarity_score",
2080 + "type": "real",
2081 + "primaryKey": false,
2082 + "notNull": false
2083 + },
2084 + "momentum_7d": {
2085 + "name": "momentum_7d",
2086 + "type": "real",
2087 + "primaryKey": false,
2088 + "notNull": false
2089 + },
2090 + "momentum_30d": {
2091 + "name": "momentum_30d",
2092 + "type": "real",
2093 + "primaryKey": false,
2094 + "notNull": false
2095 + },
2096 + "momentum_90d": {
2097 + "name": "momentum_90d",
2098 + "type": "real",
2099 + "primaryKey": false,
2100 + "notNull": false
2101 + },
2102 + "momentum_1y": {
2103 + "name": "momentum_1y",
2104 + "type": "real",
2105 + "primaryKey": false,
2106 + "notNull": false
2107 + },
2108 + "trending_score": {
2109 + "name": "trending_score",
2110 + "type": "real",
2111 + "primaryKey": false,
2112 + "notNull": false
2113 + },
2114 + "value_opportunity": {
2115 + "name": "value_opportunity",
2116 + "type": "real",
2117 + "primaryKey": false,
2118 + "notNull": false
2119 + },
2120 + "data_quality": {
2121 + "name": "data_quality",
2122 + "type": "real",
2123 + "primaryKey": false,
2124 + "notNull": false
2125 + },
2126 + "watchers": {
2127 + "name": "watchers",
2128 + "type": "integer",
2129 + "primaryKey": false,
2130 + "notNull": true,
2131 + "default": 0
2132 + },
2133 + "views_30d": {
2134 + "name": "views_30d",
2135 + "type": "integer",
2136 + "primaryKey": false,
2137 + "notNull": true,
2138 + "default": 0
2139 + },
2140 + "updated_at": {
2141 + "name": "updated_at",
2142 + "type": "timestamp with time zone",
2143 + "primaryKey": false,
2144 + "notNull": true,
2145 + "default": "now()"
2146 + }
2147 + },
2148 + "indexes": {
2149 + "asset_stats_riv_idx": {
2150 + "name": "asset_stats_riv_idx",
2151 + "columns": [
2152 + {
2153 + "expression": "riv_usd",
2154 + "isExpression": false,
2155 + "asc": true,
2156 + "nulls": "last"
2157 + }
2158 + ],
2159 + "isUnique": false,
2160 + "concurrently": false,
2161 + "method": "btree",
2162 + "with": {}
2163 + },
2164 + "asset_stats_trending_idx": {
2165 + "name": "asset_stats_trending_idx",
2166 + "columns": [
2167 + {
2168 + "expression": "trending_score",
2169 + "isExpression": false,
2170 + "asc": true,
2171 + "nulls": "last"
2172 + }
2173 + ],
2174 + "isUnique": false,
2175 + "concurrently": false,
2176 + "method": "btree",
2177 + "with": {}
2178 + },
2179 + "asset_stats_liquidity_idx": {
2180 + "name": "asset_stats_liquidity_idx",
2181 + "columns": [
2182 + {
2183 + "expression": "liquidity_score",
2184 + "isExpression": false,
2185 + "asc": true,
2186 + "nulls": "last"
2187 + }
2188 + ],
2189 + "isUnique": false,
2190 + "concurrently": false,
2191 + "method": "btree",
2192 + "with": {}
2193 + }
2194 + },
2195 + "foreignKeys": {},
2196 + "compositePrimaryKeys": {},
2197 + "uniqueConstraints": {},
2198 + "policies": {},
2199 + "checkConstraints": {},
2200 + "isRLSEnabled": false
2201 + },
2202 + "public.asset_variants": {
2203 + "name": "asset_variants",
2204 + "schema": "",
2205 + "columns": {
2206 + "id": {
2207 + "name": "id",
2208 + "type": "text",
2209 + "primaryKey": true,
2210 + "notNull": true
2211 + },
2212 + "asset_id": {
2213 + "name": "asset_id",
2214 + "type": "text",
2215 + "primaryKey": false,
2216 + "notNull": true
2217 + },
2218 + "variant_key": {
2219 + "name": "variant_key",
2220 + "type": "text",
2221 + "primaryKey": false,
2222 + "notNull": true
2223 + },
2224 + "grader": {
2225 + "name": "grader",
2226 + "type": "text",
2227 + "primaryKey": false,
2228 + "notNull": false
2229 + },
2230 + "grade": {
2231 + "name": "grade",
2232 + "type": "text",
2233 + "primaryKey": false,
2234 + "notNull": false
2235 + },
2236 + "qualifier": {
2237 + "name": "qualifier",
2238 + "type": "text",
2239 + "primaryKey": false,
2240 + "notNull": false
2241 + },
2242 + "condition": {
2243 + "name": "condition",
2244 + "type": "text",
2245 + "primaryKey": false,
2246 + "notNull": false
2247 + },
2248 + "completeness": {
2249 + "name": "completeness",
2250 + "type": "text",
2251 + "primaryKey": false,
2252 + "notNull": false
2253 + },
2254 + "size_label": {
2255 + "name": "size_label",
2256 + "type": "text",
2257 + "primaryKey": false,
2258 + "notNull": false
2259 + },
2260 + "label": {
2261 + "name": "label",
2262 + "type": "text",
2263 + "primaryKey": false,
2264 + "notNull": true
2265 + },
2266 + "is_default": {
2267 + "name": "is_default",
2268 + "type": "boolean",
2269 + "primaryKey": false,
2270 + "notNull": true,
2271 + "default": false
2272 + },
2273 + "created_at": {
2274 + "name": "created_at",
2275 + "type": "timestamp with time zone",
2276 + "primaryKey": false,
2277 + "notNull": true,
2278 + "default": "now()"
2279 + }
2280 + },
2281 + "indexes": {
2282 + "asset_variants_uq": {
2283 + "name": "asset_variants_uq",
2284 + "columns": [
2285 + {
2286 + "expression": "asset_id",
2287 + "isExpression": false,
2288 + "asc": true,
2289 + "nulls": "last"
2290 + },
2291 + {
2292 + "expression": "variant_key",
2293 + "isExpression": false,
2294 + "asc": true,
2295 + "nulls": "last"
2296 + }
2297 + ],
2298 + "isUnique": true,
2299 + "concurrently": false,
2300 + "method": "btree",
2301 + "with": {}
2302 + },
2303 + "asset_variants_asset_idx": {
2304 + "name": "asset_variants_asset_idx",
2305 + "columns": [
2306 + {
2307 + "expression": "asset_id",
2308 + "isExpression": false,
2309 + "asc": true,
2310 + "nulls": "last"
2311 + }
2312 + ],
2313 + "isUnique": false,
2314 + "concurrently": false,
2315 + "method": "btree",
2316 + "with": {}
2317 + }
2318 + },
2319 + "foreignKeys": {},
2320 + "compositePrimaryKeys": {},
2321 + "uniqueConstraints": {},
2322 + "policies": {},
2323 + "checkConstraints": {},
2324 + "isRLSEnabled": false
2325 + },
2326 + "public.assets": {
2327 + "name": "assets",
2328 + "schema": "",
2329 + "columns": {
2330 + "id": {
2331 + "name": "id",
2332 + "type": "text",
2333 + "primaryKey": true,
2334 + "notNull": true
2335 + },
2336 + "slug": {
2337 + "name": "slug",
2338 + "type": "text",
2339 + "primaryKey": false,
2340 + "notNull": true
2341 + },
2342 + "canonical_key": {
2343 + "name": "canonical_key",
2344 + "type": "text",
2345 + "primaryKey": false,
2346 + "notNull": true
2347 + },
2348 + "category_slug": {
2349 + "name": "category_slug",
2350 + "type": "text",
2351 + "primaryKey": false,
2352 + "notNull": true
2353 + },
2354 + "subcategory_slug": {
2355 + "name": "subcategory_slug",
2356 + "type": "text",
2357 + "primaryKey": false,
2358 + "notNull": false
2359 + },
2360 + "family_slug": {
2361 + "name": "family_slug",
2362 + "type": "text",
2363 + "primaryKey": false,
2364 + "notNull": true
2365 + },
2366 + "franchise": {
2367 + "name": "franchise",
2368 + "type": "text",
2369 + "primaryKey": false,
2370 + "notNull": false
2371 + },
2372 + "brand": {
2373 + "name": "brand",
2374 + "type": "text",
2375 + "primaryKey": false,
2376 + "notNull": false
2377 + },
2378 + "series": {
2379 + "name": "series",
2380 + "type": "text",
2381 + "primaryKey": false,
2382 + "notNull": false
2383 + },
2384 + "set_slug": {
2385 + "name": "set_slug",
2386 + "type": "text",
2387 + "primaryKey": false,
2388 + "notNull": false
2389 + },
2390 + "set_name": {
2391 + "name": "set_name",
2392 + "type": "text",
2393 + "primaryKey": false,
2394 + "notNull": false
2395 + },
2396 + "set_code": {
2397 + "name": "set_code",
2398 + "type": "text",
2399 + "primaryKey": false,
2400 + "notNull": false
2401 + },
2402 + "name": {
2403 + "name": "name",
2404 + "type": "text",
2405 + "primaryKey": false,
2406 + "notNull": true
2407 + },
2408 + "title": {
2409 + "name": "title",
2410 + "type": "text",
2411 + "primaryKey": false,
2412 + "notNull": true
2413 + },
2414 + "model": {
2415 + "name": "model",
2416 + "type": "text",
2417 + "primaryKey": false,
2418 + "notNull": false
2419 + },
2420 + "reference": {
2421 + "name": "reference",
2422 + "type": "text",
2423 + "primaryKey": false,
2424 + "notNull": false
2425 + },
2426 + "number": {
2427 + "name": "number",
2428 + "type": "text",
2429 + "primaryKey": false,
2430 + "notNull": false
2431 + },
2432 + "year": {
2433 + "name": "year",
2434 + "type": "integer",
2435 + "primaryKey": false,
2436 + "notNull": false
2437 + },
2438 + "edition": {
2439 + "name": "edition",
2440 + "type": "text",
2441 + "primaryKey": false,
2442 + "notNull": false
2443 + },
2444 + "variant": {
2445 + "name": "variant",
2446 + "type": "text",
2447 + "primaryKey": false,
2448 + "notNull": false
2449 + },
2450 + "language": {
2451 + "name": "language",
2452 + "type": "text",
2453 + "primaryKey": false,
2454 + "notNull": false
2455 + },
2456 + "region": {
2457 + "name": "region",
2458 + "type": "text",
2459 + "primaryKey": false,
2460 + "notNull": false
2461 + },
2462 + "country": {
2463 + "name": "country",
2464 + "type": "text",
2465 + "primaryKey": false,
2466 + "notNull": false
2467 + },
2468 + "material": {
2469 + "name": "material",
2470 + "type": "text",
2471 + "primaryKey": false,
2472 + "notNull": false
2473 + },
2474 + "size": {
2475 + "name": "size",
2476 + "type": "text",
2477 + "primaryKey": false,
2478 + "notNull": false
2479 + },
2480 + "color": {
2481 + "name": "color",
2482 + "type": "text",
2483 + "primaryKey": false,
2484 + "notNull": false
2485 + },
2486 + "rarity": {
2487 + "name": "rarity",
2488 + "type": "text",
2489 + "primaryKey": false,
2490 + "notNull": false
2491 + },
2492 + "production_quantity": {
2493 + "name": "production_quantity",
2494 + "type": "integer",
2495 + "primaryKey": false,
2496 + "notNull": false
2497 + },
2498 + "original_msrp": {
2499 + "name": "original_msrp",
2500 + "type": "numeric(18, 4)",
2501 + "primaryKey": false,
2502 + "notNull": false
2503 + },
2504 + "original_msrp_currency": {
2505 + "name": "original_msrp_currency",
2506 + "type": "text",
2507 + "primaryKey": false,
2508 + "notNull": false
2509 + },
2510 + "release_date": {
2511 + "name": "release_date",
2512 + "type": "text",
2513 + "primaryKey": false,
2514 + "notNull": false
2515 + },
2516 + "description": {
2517 + "name": "description",
2518 + "type": "text",
2519 + "primaryKey": false,
2520 + "notNull": false
2521 + },
2522 + "hero_image_url": {
2523 + "name": "hero_image_url",
2524 + "type": "text",
2525 + "primaryKey": false,
2526 + "notNull": false
2527 + },
2528 + "identifiers": {
2529 + "name": "identifiers",
2530 + "type": "jsonb",
2531 + "primaryKey": false,
2532 + "notNull": true,
2533 + "default": "'{}'::jsonb"
2534 + },
2535 + "metadata": {
2536 + "name": "metadata",
2537 + "type": "jsonb",
2538 + "primaryKey": false,
2539 + "notNull": true,
2540 + "default": "'{}'::jsonb"
2541 + },
2542 + "merged_from": {
2543 + "name": "merged_from",
2544 + "type": "text[]",
2545 + "primaryKey": false,
2546 + "notNull": true,
2547 + "default": "'{}'::text[]"
2548 + },
2549 + "data_quality": {
2550 + "name": "data_quality",
2551 + "type": "real",
2552 + "primaryKey": false,
2553 + "notNull": true,
2554 + "default": 0
2555 + },
2556 + "verified": {
2557 + "name": "verified",
2558 + "type": "boolean",
2559 + "primaryKey": false,
2560 + "notNull": true,
2561 + "default": false
2562 + },
2563 + "search": {
2564 + "name": "search",
2565 + "type": "tsvector",
2566 + "primaryKey": false,
2567 + "notNull": false,
2568 + "generated": {
2569 + "as": "setweight(to_tsvector('simple', coalesce(name, '')), 'A') || setweight(to_tsvector('simple', coalesce(set_name, '') || ' ' || coalesce(number, '') || ' ' || coalesce(variant, '') || ' ' || coalesce(edition, '')), 'B') || setweight(to_tsvector('simple', coalesce(brand, '') || ' ' || coalesce(franchise, '') || ' ' || coalesce(reference, '') || ' ' || coalesce(model, '') || ' ' || coalesce(year::text, '') || ' ' || coalesce(category_slug, '')), 'C')",
2570 + "type": "stored"
2571 + }
2572 + },
2573 + "created_at": {
2574 + "name": "created_at",
2575 + "type": "timestamp with time zone",
2576 + "primaryKey": false,
2577 + "notNull": true,
2578 + "default": "now()"
2579 + },
2580 + "updated_at": {
2581 + "name": "updated_at",
2582 + "type": "timestamp with time zone",
2583 + "primaryKey": false,
2584 + "notNull": true,
2585 + "default": "now()"
2586 + }
2587 + },
2588 + "indexes": {
2589 + "assets_canonical_key_uq": {
2590 + "name": "assets_canonical_key_uq",
2591 + "columns": [
2592 + {
2593 + "expression": "canonical_key",
2594 + "isExpression": false,
2595 + "asc": true,
2596 + "nulls": "last"
2597 + }
2598 + ],
2599 + "isUnique": true,
2600 + "concurrently": false,
2601 + "method": "btree",
2602 + "with": {}
2603 + },
2604 + "assets_slug_uq": {
2605 + "name": "assets_slug_uq",
2606 + "columns": [
2607 + {
2608 + "expression": "slug",
2609 + "isExpression": false,
2610 + "asc": true,
2611 + "nulls": "last"
2612 + }
2613 + ],
2614 + "isUnique": true,
2615 + "concurrently": false,
2616 + "method": "btree",
2617 + "with": {}
2618 + },
2619 + "assets_category_idx": {
2620 + "name": "assets_category_idx",
2621 + "columns": [
2622 + {
2623 + "expression": "category_slug",
2624 + "isExpression": false,
2625 + "asc": true,
2626 + "nulls": "last"
2627 + }
2628 + ],
2629 + "isUnique": false,
2630 + "concurrently": false,
2631 + "method": "btree",
2632 + "with": {}
2633 + },
2634 + "assets_family_idx": {
2635 + "name": "assets_family_idx",
2636 + "columns": [
2637 + {
2638 + "expression": "family_slug",
2639 + "isExpression": false,
2640 + "asc": true,
2641 + "nulls": "last"
2642 + }
2643 + ],
2644 + "isUnique": false,
2645 + "concurrently": false,
2646 + "method": "btree",
2647 + "with": {}
2648 + },
2649 + "assets_set_idx": {
2650 + "name": "assets_set_idx",
2651 + "columns": [
2652 + {
2653 + "expression": "set_slug",
2654 + "isExpression": false,
2655 + "asc": true,
2656 + "nulls": "last"
2657 + }
2658 + ],
2659 + "isUnique": false,
2660 + "concurrently": false,
2661 + "method": "btree",
2662 + "with": {}
2663 + },
2664 + "assets_search_gin": {
2665 + "name": "assets_search_gin",
2666 + "columns": [
2667 + {
2668 + "expression": "search",
2669 + "isExpression": false,
2670 + "asc": true,
2671 + "nulls": "last"
2672 + }
2673 + ],
2674 + "isUnique": false,
2675 + "concurrently": false,
2676 + "method": "gin",
2677 + "with": {}
2678 + },
2679 + "assets_title_trgm": {
2680 + "name": "assets_title_trgm",
2681 + "columns": [
2682 + {
2683 + "expression": "\"title\" gin_trgm_ops",
2684 + "asc": true,
2685 + "isExpression": true,
2686 + "nulls": "last"
2687 + }
2688 + ],
2689 + "isUnique": false,
2690 + "concurrently": false,
2691 + "method": "gin",
2692 + "with": {}
2693 + },
2694 + "assets_identifiers_gin": {
2695 + "name": "assets_identifiers_gin",
2696 + "columns": [
2697 + {
2698 + "expression": "identifiers",
2699 + "isExpression": false,
2700 + "asc": true,
2701 + "nulls": "last"
2702 + }
2703 + ],
2704 + "isUnique": false,
2705 + "concurrently": false,
2706 + "method": "gin",
2707 + "with": {}
2708 + }
2709 + },
2710 + "foreignKeys": {},
2711 + "compositePrimaryKeys": {},
2712 + "uniqueConstraints": {},
2713 + "policies": {},
2714 + "checkConstraints": {},
2715 + "isRLSEnabled": false
2716 + },
2717 + "public.grade_premiums": {
2718 + "name": "grade_premiums",
2719 + "schema": "",
2720 + "columns": {
2721 + "id": {
2722 + "name": "id",
2723 + "type": "text",
2724 + "primaryKey": true,
2725 + "notNull": true
2726 + },
2727 + "category_slug": {
2728 + "name": "category_slug",
2729 + "type": "text",
2730 + "primaryKey": false,
2731 + "notNull": true
2732 + },
2733 + "grader": {
2734 + "name": "grader",
2735 + "type": "text",
2736 + "primaryKey": false,
2737 + "notNull": true
2738 + },
2739 + "grade": {
2740 + "name": "grade",
2741 + "type": "text",
2742 + "primaryKey": false,
2743 + "notNull": true
2744 + },
2745 + "market_multiplier": {
2746 + "name": "market_multiplier",
2747 + "type": "real",
2748 + "primaryKey": false,
2749 + "notNull": true
2750 + },
2751 + "sample_size": {
2752 + "name": "sample_size",
2753 + "type": "integer",
2754 + "primaryKey": false,
2755 + "notNull": true
2756 + },
2757 + "computed_at": {
2758 + "name": "computed_at",
2759 + "type": "timestamp with time zone",
2760 + "primaryKey": false,
2761 + "notNull": true
2762 + }
2763 + },
2764 + "indexes": {
2765 + "grade_premiums_uq": {
2766 + "name": "grade_premiums_uq",
2767 + "columns": [
2768 + {
2769 + "expression": "category_slug",
2770 + "isExpression": false,
2771 + "asc": true,
2772 + "nulls": "last"
2773 + },
2774 + {
2775 + "expression": "grader",
2776 + "isExpression": false,
2777 + "asc": true,
2778 + "nulls": "last"
2779 + },
2780 + {
2781 + "expression": "grade",
2782 + "isExpression": false,
2783 + "asc": true,
2784 + "nulls": "last"
2785 + }
2786 + ],
2787 + "isUnique": true,
2788 + "concurrently": false,
2789 + "method": "btree",
2790 + "with": {}
2791 + }
2792 + },
2793 + "foreignKeys": {},
2794 + "compositePrimaryKeys": {},
2795 + "uniqueConstraints": {},
2796 + "policies": {},
2797 + "checkConstraints": {},
2798 + "isRLSEnabled": false
2799 + },
2800 + "public.images": {
2801 + "name": "images",
2802 + "schema": "",
2803 + "columns": {
2804 + "id": {
2805 + "name": "id",
2806 + "type": "text",
2807 + "primaryKey": true,
2808 + "notNull": true
2809 + },
2810 + "asset_id": {
2811 + "name": "asset_id",
2812 + "type": "text",
2813 + "primaryKey": false,
2814 + "notNull": false
2815 + },
2816 + "listing_id": {
2817 + "name": "listing_id",
2818 + "type": "text",
2819 + "primaryKey": false,
2820 + "notNull": false
2821 + },
2822 + "sale_id": {
2823 + "name": "sale_id",
2824 + "type": "text",
2825 + "primaryKey": false,
2826 + "notNull": false
2827 + },
2828 + "source_id": {
2829 + "name": "source_id",
2830 + "type": "text",
2831 + "primaryKey": false,
2832 + "notNull": false
2833 + },
2834 + "url": {
2835 + "name": "url",
2836 + "type": "text",
2837 + "primaryKey": false,
2838 + "notNull": true
2839 + },
2840 + "role": {
2841 + "name": "role",
2842 + "type": "text",
2843 + "primaryKey": false,
2844 + "notNull": true,
2845 + "default": "'gallery'"
2846 + },
2847 + "width": {
2848 + "name": "width",
2849 + "type": "integer",
2850 + "primaryKey": false,
2851 + "notNull": false
2852 + },
2853 + "height": {
2854 + "name": "height",
2855 + "type": "integer",
2856 + "primaryKey": false,
2857 + "notNull": false
2858 + },
2859 + "phash": {
2860 + "name": "phash",
2861 + "type": "text",
2862 + "primaryKey": false,
2863 + "notNull": false
2864 + },
2865 + "embedding": {
2866 + "name": "embedding",
2867 + "type": "vector(512)",
2868 + "primaryKey": false,
2869 + "notNull": false
2870 + },
2871 + "attribution": {
2872 + "name": "attribution",
2873 + "type": "text",
2874 + "primaryKey": false,
2875 + "notNull": false
2876 + },
2877 + "created_at": {
2878 + "name": "created_at",
2879 + "type": "timestamp with time zone",
2880 + "primaryKey": false,
2881 + "notNull": true,
2882 + "default": "now()"
2883 + }
2884 + },
2885 + "indexes": {
2886 + "images_asset_idx": {
2887 + "name": "images_asset_idx",
2888 + "columns": [
2889 + {
2890 + "expression": "asset_id",
2891 + "isExpression": false,
2892 + "asc": true,
2893 + "nulls": "last"
2894 + }
2895 + ],
2896 + "isUnique": false,
2897 + "concurrently": false,
2898 + "method": "btree",
2899 + "with": {}
2900 + },
2901 + "images_phash_idx": {
2902 + "name": "images_phash_idx",
2903 + "columns": [
2904 + {
2905 + "expression": "phash",
2906 + "isExpression": false,
2907 + "asc": true,
2908 + "nulls": "last"
2909 + }
2910 + ],
2911 + "isUnique": false,
2912 + "concurrently": false,
2913 + "method": "btree",
2914 + "with": {}
2915 + },
2916 + "images_url_uq": {
2917 + "name": "images_url_uq",
2918 + "columns": [
2919 + {
2920 + "expression": "url",
2921 + "isExpression": false,
2922 + "asc": true,
2923 + "nulls": "last"
2924 + }
2925 + ],
2926 + "isUnique": true,
2927 + "concurrently": false,
2928 + "method": "btree",
2929 + "with": {}
2930 + }
2931 + },
2932 + "foreignKeys": {},
2933 + "compositePrimaryKeys": {},
2934 + "uniqueConstraints": {},
2935 + "policies": {},
2936 + "checkConstraints": {},
2937 + "isRLSEnabled": false
2938 + },
2939 + "public.population_reports": {
2940 + "name": "population_reports",
2941 + "schema": "",
2942 + "columns": {
2943 + "id": {
2944 + "name": "id",
2945 + "type": "text",
2946 + "primaryKey": true,
2947 + "notNull": true
2948 + },
2949 + "asset_id": {
2950 + "name": "asset_id",
2951 + "type": "text",
2952 + "primaryKey": false,
2953 + "notNull": true
2954 + },
2955 + "grader": {
2956 + "name": "grader",
2957 + "type": "text",
2958 + "primaryKey": false,
2959 + "notNull": true
2960 + },
2961 + "source_id": {
2962 + "name": "source_id",
2963 + "type": "text",
2964 + "primaryKey": false,
2965 + "notNull": true
2966 + },
2967 + "source_url": {
2968 + "name": "source_url",
2969 + "type": "text",
2970 + "primaryKey": false,
2971 + "notNull": false
2972 + },
2973 + "report_date": {
2974 + "name": "report_date",
2975 + "type": "text",
2976 + "primaryKey": false,
2977 + "notNull": true
2978 + },
2979 + "total": {
2980 + "name": "total",
2981 + "type": "integer",
2982 + "primaryKey": false,
2983 + "notNull": true
2984 + },
2985 + "by_grade": {
2986 + "name": "by_grade",
2987 + "type": "jsonb",
2988 + "primaryKey": false,
2989 + "notNull": true
2990 + },
2991 + "created_at": {
2992 + "name": "created_at",
2993 + "type": "timestamp with time zone",
2994 + "primaryKey": false,
2995 + "notNull": true,
2996 + "default": "now()"
2997 + }
2998 + },
2999 + "indexes": {
3000 + "population_reports_uq": {
3001 + "name": "population_reports_uq",
3002 + "columns": [
3003 + {
3004 + "expression": "asset_id",
3005 + "isExpression": false,
3006 + "asc": true,
3007 + "nulls": "last"
3008 + },
3009 + {
3010 + "expression": "grader",
3011 + "isExpression": false,
3012 + "asc": true,
3013 + "nulls": "last"
3014 + },
3015 + {
3016 + "expression": "report_date",
3017 + "isExpression": false,
3018 + "asc": true,
3019 + "nulls": "last"
3020 + }
3021 + ],
3022 + "isUnique": true,
3023 + "concurrently": false,
3024 + "method": "btree",
3025 + "with": {}
3026 + }
3027 + },
3028 + "foreignKeys": {},
3029 + "compositePrimaryKeys": {},
3030 + "uniqueConstraints": {},
3031 + "policies": {},
3032 + "checkConstraints": {},
3033 + "isRLSEnabled": false
3034 + },
3035 + "public.variant_stats": {
3036 + "name": "variant_stats",
3037 + "schema": "",
3038 + "columns": {
3039 + "variant_id": {
3040 + "name": "variant_id",
3041 + "type": "text",
3042 + "primaryKey": true,
3043 + "notNull": true
3044 + },
3045 + "asset_id": {
3046 + "name": "asset_id",
3047 + "type": "text",
3048 + "primaryKey": false,
3049 + "notNull": true
3050 + },
3051 + "riv_usd": {
3052 + "name": "riv_usd",
3053 + "type": "numeric(18, 4)",
3054 + "primaryKey": false,
3055 + "notNull": false
3056 + },
3057 + "riv_low_usd": {
3058 + "name": "riv_low_usd",
3059 + "type": "numeric(18, 4)",
3060 + "primaryKey": false,
3061 + "notNull": false
3062 + },
3063 + "riv_high_usd": {
3064 + "name": "riv_high_usd",
3065 + "type": "numeric(18, 4)",
3066 + "primaryKey": false,
3067 + "notNull": false
3068 + },
3069 + "riv_confidence": {
3070 + "name": "riv_confidence",
3071 + "type": "numeric(8, 6)",
3072 + "primaryKey": false,
3073 + "notNull": false
3074 + },
3075 + "riv_sample_size": {
3076 + "name": "riv_sample_size",
3077 + "type": "integer",
3078 + "primaryKey": false,
3079 + "notNull": true,
3080 + "default": 0
3081 + },
3082 + "latest_sale_usd": {
3083 + "name": "latest_sale_usd",
3084 + "type": "numeric(18, 4)",
3085 + "primaryKey": false,
3086 + "notNull": false
3087 + },
3088 + "latest_sale_at": {
3089 + "name": "latest_sale_at",
3090 + "type": "timestamp with time zone",
3091 + "primaryKey": false,
3092 + "notNull": false
3093 + },
3094 + "change_30d": {
3095 + "name": "change_30d",
3096 + "type": "numeric(8, 6)",
3097 + "primaryKey": false,
3098 + "notNull": false
3099 + },
3100 + "change_1y": {
3101 + "name": "change_1y",
3102 + "type": "numeric(8, 6)",
3103 + "primaryKey": false,
3104 + "notNull": false
3105 + },
3106 + "sales_count": {
3107 + "name": "sales_count",
3108 + "type": "integer",
3109 + "primaryKey": false,
3110 + "notNull": true,
3111 + "default": 0
3112 + },
3113 + "sales_30d": {
3114 + "name": "sales_30d",
3115 + "type": "integer",
3116 + "primaryKey": false,
3117 + "notNull": true,
3118 + "default": 0
3119 + },
3120 + "active_listings": {
3121 + "name": "active_listings",
3122 + "type": "integer",
3123 + "primaryKey": false,
3124 + "notNull": true,
3125 + "default": 0
3126 + },
3127 + "min_ask_usd": {
3128 + "name": "min_ask_usd",
3129 + "type": "numeric(18, 4)",
3130 + "primaryKey": false,
3131 + "notNull": false
3132 + },
3133 + "liquidity_score": {
3134 + "name": "liquidity_score",
3135 + "type": "real",
3136 + "primaryKey": false,
3137 + "notNull": false
3138 + },
3139 + "updated_at": {
3140 + "name": "updated_at",
3141 + "type": "timestamp with time zone",
3142 + "primaryKey": false,
3143 + "notNull": true,
3144 + "default": "now()"
3145 + }
3146 + },
3147 + "indexes": {},
3148 + "foreignKeys": {},
3149 + "compositePrimaryKeys": {},
3150 + "uniqueConstraints": {},
3151 + "policies": {},
3152 + "checkConstraints": {},
3153 + "isRLSEnabled": false
3154 + },
3155 + "public.auction_lots": {
3156 + "name": "auction_lots",
3157 + "schema": "",
3158 + "columns": {
3159 + "id": {
3160 + "name": "id",
3161 + "type": "text",
3162 + "primaryKey": true,
3163 + "notNull": true
3164 + },
3165 + "auction_id": {
3166 + "name": "auction_id",
3167 + "type": "text",
3168 + "primaryKey": false,
3169 + "notNull": true
3170 + },
3171 + "asset_id": {
3172 + "name": "asset_id",
3173 + "type": "text",
3174 + "primaryKey": false,
3175 + "notNull": false
3176 + },
3177 + "variant_id": {
3178 + "name": "variant_id",
3179 + "type": "text",
3180 + "primaryKey": false,
3181 + "notNull": false
3182 + },
3183 + "source_id": {
3184 + "name": "source_id",
3185 + "type": "text",
3186 + "primaryKey": false,
3187 + "notNull": true
3188 + },
3189 + "lot_number": {
3190 + "name": "lot_number",
3191 + "type": "text",
3192 + "primaryKey": false,
3193 + "notNull": false
3194 + },
3195 + "title": {
3196 + "name": "title",
3197 + "type": "text",
3198 + "primaryKey": false,
3199 + "notNull": true
3200 + },
3201 + "url": {
3202 + "name": "url",
3203 + "type": "text",
3204 + "primaryKey": false,
3205 + "notNull": true
3206 + },
3207 + "estimate_low": {
3208 + "name": "estimate_low",
3209 + "type": "numeric(18, 4)",
3210 + "primaryKey": false,
3211 + "notNull": false
3212 + },
3213 + "estimate_high": {
3214 + "name": "estimate_high",
3215 + "type": "numeric(18, 4)",
3216 + "primaryKey": false,
3217 + "notNull": false
3218 + },
3219 + "current_bid": {
3220 + "name": "current_bid",
3221 + "type": "numeric(18, 4)",
3222 + "primaryKey": false,
3223 + "notNull": false
3224 + },
3225 + "hammer_price": {
3226 + "name": "hammer_price",
3227 + "type": "numeric(18, 4)",
3228 + "primaryKey": false,
3229 + "notNull": false
3230 + },
3231 + "currency": {
3232 + "name": "currency",
3233 + "type": "text",
3234 + "primaryKey": false,
3235 + "notNull": false
3236 + },
3237 + "bid_count": {
3238 + "name": "bid_count",
3239 + "type": "integer",
3240 + "primaryKey": false,
3241 + "notNull": false
3242 + },
3243 + "starts_at": {
3244 + "name": "starts_at",
3245 + "type": "timestamp with time zone",
3246 + "primaryKey": false,
3247 + "notNull": false
3248 + },
3249 + "ends_at": {
3250 + "name": "ends_at",
3251 + "type": "timestamp with time zone",
3252 + "primaryKey": false,
3253 + "notNull": false
3254 + },
3255 + "status": {
3256 + "name": "status",
3257 + "type": "text",
3258 + "primaryKey": false,
3259 + "notNull": true,
3260 + "default": "'upcoming'"
3261 + },
3262 + "image_urls": {
3263 + "name": "image_urls",
3264 + "type": "jsonb",
3265 + "primaryKey": false,
3266 + "notNull": true,
3267 + "default": "'[]'::jsonb"
3268 + },
3269 + "grader": {
3270 + "name": "grader",
3271 + "type": "text",
3272 + "primaryKey": false,
3273 + "notNull": false
3274 + },
3275 + "grade": {
3276 + "name": "grade",
3277 + "type": "text",
3278 + "primaryKey": false,
3279 + "notNull": false
3280 + },
3281 + "created_at": {
3282 + "name": "created_at",
3283 + "type": "timestamp with time zone",
3284 + "primaryKey": false,
3285 + "notNull": true,
3286 + "default": "now()"
3287 + },
3288 + "updated_at": {
3289 + "name": "updated_at",
3290 + "type": "timestamp with time zone",
3291 + "primaryKey": false,
3292 + "notNull": true,
3293 + "default": "now()"
3294 + }
3295 + },
3296 + "indexes": {
3297 + "auction_lots_url_uq": {
3298 + "name": "auction_lots_url_uq",
3299 + "columns": [
3300 + {
3301 + "expression": "url",
3302 + "isExpression": false,
3303 + "asc": true,
3304 + "nulls": "last"
3305 + }
3306 + ],
3307 + "isUnique": true,
3308 + "concurrently": false,
3309 + "method": "btree",
3310 + "with": {}
3311 + },
3312 + "auction_lots_auction_idx": {
3313 + "name": "auction_lots_auction_idx",
3314 + "columns": [
3315 + {
3316 + "expression": "auction_id",
3317 + "isExpression": false,
3318 + "asc": true,
3319 + "nulls": "last"
3320 + }
3321 + ],
3322 + "isUnique": false,
3323 + "concurrently": false,
3324 + "method": "btree",
3325 + "with": {}
3326 + },
3327 + "auction_lots_asset_idx": {
3328 + "name": "auction_lots_asset_idx",
3329 + "columns": [
3330 + {
3331 + "expression": "asset_id",
3332 + "isExpression": false,
3333 + "asc": true,
3334 + "nulls": "last"
3335 + }
3336 + ],
3337 + "isUnique": false,
3338 + "concurrently": false,
3339 + "method": "btree",
3340 + "with": {}
3341 + },
3342 + "auction_lots_ends_idx": {
3343 + "name": "auction_lots_ends_idx",
3344 + "columns": [
3345 + {
3346 + "expression": "ends_at",
3347 + "isExpression": false,
3348 + "asc": true,
3349 + "nulls": "last"
3350 + }
3351 + ],
3352 + "isUnique": false,
3353 + "concurrently": false,
3354 + "method": "btree",
3355 + "with": {}
3356 + }
3357 + },
3358 + "foreignKeys": {},
3359 + "compositePrimaryKeys": {},
3360 + "uniqueConstraints": {},
3361 + "policies": {},
3362 + "checkConstraints": {},
3363 + "isRLSEnabled": false
3364 + },
3365 + "public.auctions": {
3366 + "name": "auctions",
3367 + "schema": "",
3368 + "columns": {
3369 + "id": {
3370 + "name": "id",
3371 + "type": "text",
3372 + "primaryKey": true,
3373 + "notNull": true
3374 + },
3375 + "source_id": {
3376 + "name": "source_id",
3377 + "type": "text",
3378 + "primaryKey": false,
3379 + "notNull": true
3380 + },
3381 + "auction_house": {
3382 + "name": "auction_house",
3383 + "type": "text",
3384 + "primaryKey": false,
3385 + "notNull": true
3386 + },
3387 + "name": {
3388 + "name": "name",
3389 + "type": "text",
3390 + "primaryKey": false,
3391 + "notNull": true
3392 + },
3393 + "url": {
3394 + "name": "url",
3395 + "type": "text",
3396 + "primaryKey": false,
3397 + "notNull": true
3398 + },
3399 + "starts_at": {
3400 + "name": "starts_at",
3401 + "type": "timestamp with time zone",
3402 + "primaryKey": false,
3403 + "notNull": false
3404 + },
3405 + "ends_at": {
3406 + "name": "ends_at",
3407 + "type": "timestamp with time zone",
3408 + "primaryKey": false,
3409 + "notNull": false
3410 + },
3411 + "location": {
3412 + "name": "location",
3413 + "type": "text",
3414 + "primaryKey": false,
3415 + "notNull": false
3416 + },
3417 + "category_slugs": {
3418 + "name": "category_slugs",
3419 + "type": "text[]",
3420 + "primaryKey": false,
3421 + "notNull": true,
3422 + "default": "'{}'::text[]"
3423 + },
3424 + "lot_count": {
3425 + "name": "lot_count",
3426 + "type": "integer",
3427 + "primaryKey": false,
3428 + "notNull": false
3429 + },
3430 + "status": {
3431 + "name": "status",
3432 + "type": "text",
3433 + "primaryKey": false,
3434 + "notNull": true,
3435 + "default": "'upcoming'"
3436 + },
3437 + "currency": {
3438 + "name": "currency",
3439 + "type": "text",
3440 + "primaryKey": false,
3441 + "notNull": false
3442 + },
3443 + "created_at": {
3444 + "name": "created_at",
3445 + "type": "timestamp with time zone",
3446 + "primaryKey": false,
3447 + "notNull": true,
3448 + "default": "now()"
3449 + },
3450 + "updated_at": {
3451 + "name": "updated_at",
3452 + "type": "timestamp with time zone",
3453 + "primaryKey": false,
3454 + "notNull": true,
3455 + "default": "now()"
3456 + }
3457 + },
3458 + "indexes": {
3459 + "auctions_url_uq": {
3460 + "name": "auctions_url_uq",
3461 + "columns": [
3462 + {
3463 + "expression": "url",
3464 + "isExpression": false,
3465 + "asc": true,
3466 + "nulls": "last"
3467 + }
3468 + ],
3469 + "isUnique": true,
3470 + "concurrently": false,
3471 + "method": "btree",
3472 + "with": {}
3473 + },
3474 + "auctions_ends_idx": {
3475 + "name": "auctions_ends_idx",
3476 + "columns": [
3477 + {
3478 + "expression": "ends_at",
3479 + "isExpression": false,
3480 + "asc": true,
3481 + "nulls": "last"
3482 + }
3483 + ],
3484 + "isUnique": false,
3485 + "concurrently": false,
3486 + "method": "btree",
3487 + "with": {}
3488 + }
3489 + },
3490 + "foreignKeys": {},
3491 + "compositePrimaryKeys": {},
3492 + "uniqueConstraints": {},
3493 + "policies": {},
3494 + "checkConstraints": {},
3495 + "isRLSEnabled": false
3496 + },
3497 + "public.cross_listing_groups": {
3498 + "name": "cross_listing_groups",
3499 + "schema": "",
3500 + "columns": {
3501 + "id": {
3502 + "name": "id",
3503 + "type": "text",
3504 + "primaryKey": true,
3505 + "notNull": true
3506 + },
3507 + "asset_id": {
3508 + "name": "asset_id",
3509 + "type": "text",
3510 + "primaryKey": false,
3511 + "notNull": false
3512 + },
3513 + "signals": {
3514 + "name": "signals",
3515 + "type": "jsonb",
3516 + "primaryKey": false,
3517 + "notNull": true,
3518 + "default": "'{}'::jsonb"
3519 + },
3520 + "created_at": {
3521 + "name": "created_at",
3522 + "type": "timestamp with time zone",
3523 + "primaryKey": false,
3524 + "notNull": true,
3525 + "default": "now()"
3526 + }
3527 + },
3528 + "indexes": {},
3529 + "foreignKeys": {},
3530 + "compositePrimaryKeys": {},
3531 + "uniqueConstraints": {},
3532 + "policies": {},
3533 + "checkConstraints": {},
3534 + "isRLSEnabled": false
3535 + },
3536 + "public.fx_rates": {
3537 + "name": "fx_rates",
3538 + "schema": "",
3539 + "columns": {
3540 + "date": {
3541 + "name": "date",
3542 + "type": "date",
3543 + "primaryKey": false,
3544 + "notNull": true
3545 + },
3546 + "base": {
3547 + "name": "base",
3548 + "type": "text",
3549 + "primaryKey": false,
3550 + "notNull": true
3551 + },
3552 + "quote": {
3553 + "name": "quote",
3554 + "type": "text",
3555 + "primaryKey": false,
3556 + "notNull": true
3557 + },
3558 + "rate": {
3559 + "name": "rate",
3560 + "type": "real",
3561 + "primaryKey": false,
3562 + "notNull": true
3563 + },
3564 + "source": {
3565 + "name": "source",
3566 + "type": "text",
3567 + "primaryKey": false,
3568 + "notNull": true,
3569 + "default": "'ecb'"
3570 + }
3571 + },
3572 + "indexes": {
3573 + "fx_rates_uq": {
3574 + "name": "fx_rates_uq",
3575 + "columns": [
3576 + {
3577 + "expression": "date",
3578 + "isExpression": false,
3579 + "asc": true,
3580 + "nulls": "last"
3581 + },
3582 + {
3583 + "expression": "base",
3584 + "isExpression": false,
3585 + "asc": true,
3586 + "nulls": "last"
3587 + },
3588 + {
3589 + "expression": "quote",
3590 + "isExpression": false,
3591 + "asc": true,
3592 + "nulls": "last"
3593 + }
3594 + ],
3595 + "isUnique": true,
3596 + "concurrently": false,
3597 + "method": "btree",
3598 + "with": {}
3599 + }
3600 + },
3601 + "foreignKeys": {},
3602 + "compositePrimaryKeys": {},
3603 + "uniqueConstraints": {},
3604 + "policies": {},
3605 + "checkConstraints": {},
3606 + "isRLSEnabled": false
3607 + },
3608 + "public.listing_events": {
3609 + "name": "listing_events",
3610 + "schema": "",
3611 + "columns": {
3612 + "id": {
3613 + "name": "id",
3614 + "type": "text",
3615 + "primaryKey": true,
3616 + "notNull": true
3617 + },
3618 + "listing_id": {
3619 + "name": "listing_id",
3620 + "type": "text",
3621 + "primaryKey": false,
3622 + "notNull": true
3623 + },
3624 + "event_type": {
3625 + "name": "event_type",
3626 + "type": "text",
3627 + "primaryKey": false,
3628 + "notNull": true
3629 + },
3630 + "old_price": {
3631 + "name": "old_price",
3632 + "type": "numeric(18, 4)",
3633 + "primaryKey": false,
3634 + "notNull": false
3635 + },
3636 + "new_price": {
3637 + "name": "new_price",
3638 + "type": "numeric(18, 4)",
3639 + "primaryKey": false,
3640 + "notNull": false
3641 + },
3642 + "currency": {
3643 + "name": "currency",
3644 + "type": "text",
3645 + "primaryKey": false,
3646 + "notNull": false
3647 + },
3648 + "occurred_at": {
3649 + "name": "occurred_at",
3650 + "type": "timestamp with time zone",
3651 + "primaryKey": false,
3652 + "notNull": true
3653 + }
3654 + },
3655 + "indexes": {
3656 + "listing_events_listing_idx": {
3657 + "name": "listing_events_listing_idx",
3658 + "columns": [
3659 + {
3660 + "expression": "listing_id",
3661 + "isExpression": false,
3662 + "asc": true,
3663 + "nulls": "last"
3664 + },
3665 + {
3666 + "expression": "occurred_at",
3667 + "isExpression": false,
3668 + "asc": true,
3669 + "nulls": "last"
3670 + }
3671 + ],
3672 + "isUnique": false,
3673 + "concurrently": false,
3674 + "method": "btree",
3675 + "with": {}
3676 + }
3677 + },
3678 + "foreignKeys": {},
3679 + "compositePrimaryKeys": {},
3680 + "uniqueConstraints": {},
3681 + "policies": {},
3682 + "checkConstraints": {},
3683 + "isRLSEnabled": false
3684 + },
3685 + "public.listings": {
3686 + "name": "listings",
3687 + "schema": "",
3688 + "columns": {
3689 + "id": {
3690 + "name": "id",
3691 + "type": "text",
3692 + "primaryKey": true,
3693 + "notNull": true
3694 + },
3695 + "asset_id": {
3696 + "name": "asset_id",
3697 + "type": "text",
3698 + "primaryKey": false,
3699 + "notNull": true
3700 + },
3701 + "variant_id": {
3702 + "name": "variant_id",
3703 + "type": "text",
3704 + "primaryKey": false,
3705 + "notNull": false
3706 + },
3707 + "source_id": {
3708 + "name": "source_id",
3709 + "type": "text",
3710 + "primaryKey": false,
3711 + "notNull": true
3712 + },
3713 + "connector_id": {
3714 + "name": "connector_id",
3715 + "type": "text",
3716 + "primaryKey": false,
3717 + "notNull": true
3718 + },
3719 + "raw_record_id": {
3720 + "name": "raw_record_id",
3721 + "type": "text",
3722 + "primaryKey": false,
3723 + "notNull": false
3724 + },
3725 + "source_url": {
3726 + "name": "source_url",
3727 + "type": "text",
3728 + "primaryKey": false,
3729 + "notNull": true
3730 + },
3731 + "external_id": {
3732 + "name": "external_id",
3733 + "type": "text",
3734 + "primaryKey": false,
3735 + "notNull": true
3736 + },
3737 + "listing_type": {
3738 + "name": "listing_type",
3739 + "type": "text",
3740 + "primaryKey": false,
3741 + "notNull": true,
3742 + "default": "'unknown'"
3743 + },
3744 + "price": {
3745 + "name": "price",
3746 + "type": "numeric(18, 4)",
3747 + "primaryKey": false,
3748 + "notNull": false
3749 + },
3750 + "currency": {
3751 + "name": "currency",
3752 + "type": "text",
3753 + "primaryKey": false,
3754 + "notNull": false
3755 + },
3756 + "price_usd": {
3757 + "name": "price_usd",
3758 + "type": "numeric(18, 4)",
3759 + "primaryKey": false,
3760 + "notNull": false
3761 + },
3762 + "seller": {
3763 + "name": "seller",
3764 + "type": "text",
3765 + "primaryKey": false,
3766 + "notNull": false
3767 + },
3768 + "seller_reputation": {
3769 + "name": "seller_reputation",
3770 + "type": "text",
3771 + "primaryKey": false,
3772 + "notNull": false
3773 + },
3774 + "location": {
3775 + "name": "location",
3776 + "type": "text",
3777 + "primaryKey": false,
3778 + "notNull": false
3779 + },
3780 + "shipping_cost": {
3781 + "name": "shipping_cost",
3782 + "type": "numeric(18, 4)",
3783 + "primaryKey": false,
3784 + "notNull": false
3785 + },
3786 + "quantity": {
3787 + "name": "quantity",
3788 + "type": "integer",
3789 + "primaryKey": false,
3790 + "notNull": false
3791 + },
3792 + "condition": {
3793 + "name": "condition",
3794 + "type": "text",
3795 + "primaryKey": false,
3796 + "notNull": false
3797 + },
3798 + "grader": {
3799 + "name": "grader",
3800 + "type": "text",
3801 + "primaryKey": false,
3802 + "notNull": false
3803 + },
3804 + "grade": {
3805 + "name": "grade",
3806 + "type": "text",
3807 + "primaryKey": false,
3808 + "notNull": false
3809 + },
3810 + "certification_number": {
3811 + "name": "certification_number",
3812 + "type": "text",
3813 + "primaryKey": false,
3814 + "notNull": false
3815 + },
3816 + "image_urls": {
3817 + "name": "image_urls",
3818 + "type": "jsonb",
3819 + "primaryKey": false,
3820 + "notNull": true,
3821 + "default": "'[]'::jsonb"
3822 + },
3823 + "raw_title": {
3824 + "name": "raw_title",
3825 + "type": "text",
3826 + "primaryKey": false,
3827 + "notNull": true
3828 + },
3829 + "description": {
3830 + "name": "description",
3831 + "type": "text",
3832 + "primaryKey": false,
3833 + "notNull": false
3834 + },
3835 + "listed_at": {
3836 + "name": "listed_at",
3837 + "type": "timestamp with time zone",
3838 + "primaryKey": false,
3839 + "notNull": false
3840 + },
3841 + "ends_at": {
3842 + "name": "ends_at",
3843 + "type": "timestamp with time zone",
3844 + "primaryKey": false,
3845 + "notNull": false
3846 + },
3847 + "availability": {
3848 + "name": "availability",
3849 + "type": "text",
3850 + "primaryKey": false,
3851 + "notNull": true,
3852 + "default": "'available'"
3853 + },
3854 + "bid_count": {
3855 + "name": "bid_count",
3856 + "type": "integer",
3857 + "primaryKey": false,
3858 + "notNull": false
3859 + },
3860 + "first_seen_at": {
3861 + "name": "first_seen_at",
3862 + "type": "timestamp with time zone",
3863 + "primaryKey": false,
3864 + "notNull": true
3865 + },
3866 + "last_seen_at": {
3867 + "name": "last_seen_at",
3868 + "type": "timestamp with time zone",
3869 + "primaryKey": false,
3870 + "notNull": true
3871 + },
3872 + "price_changed_at": {
3873 + "name": "price_changed_at",
3874 + "type": "timestamp with time zone",
3875 + "primaryKey": false,
3876 + "notNull": false
3877 + },
3878 + "cross_listing_group_id": {
3879 + "name": "cross_listing_group_id",
3880 + "type": "text",
3881 + "primaryKey": false,
3882 + "notNull": false
3883 + },
3884 + "confidence": {
3885 + "name": "confidence",
3886 + "type": "numeric(8, 6)",
3887 + "primaryKey": false,
3888 + "notNull": true,
3889 + "default": 0.8
3890 + },
3891 + "data_quality": {
3892 + "name": "data_quality",
3893 + "type": "real",
3894 + "primaryKey": false,
3895 + "notNull": true,
3896 + "default": 0
3897 + },
3898 + "flags": {
3899 + "name": "flags",
3900 + "type": "text[]",
3901 + "primaryKey": false,
3902 + "notNull": true,
3903 + "default": "'{}'::text[]"
3904 + },
3905 + "discount_to_riv": {
3906 + "name": "discount_to_riv",
3907 + "type": "numeric(8, 6)",
3908 + "primaryKey": false,
3909 + "notNull": false
3910 + },
3911 + "created_at": {
3912 + "name": "created_at",
3913 + "type": "timestamp with time zone",
3914 + "primaryKey": false,
3915 + "notNull": true,
3916 + "default": "now()"
3917 + },
3918 + "updated_at": {
3919 + "name": "updated_at",
3920 + "type": "timestamp with time zone",
3921 + "primaryKey": false,
3922 + "notNull": true,
3923 + "default": "now()"
3924 + }
3925 + },
3926 + "indexes": {
3927 + "listings_source_external_uq": {
3928 + "name": "listings_source_external_uq",
3929 + "columns": [
3930 + {
3931 + "expression": "source_id",
3932 + "isExpression": false,
3933 + "asc": true,
3934 + "nulls": "last"
3935 + },
3936 + {
3937 + "expression": "external_id",
3938 + "isExpression": false,
3939 + "asc": true,
3940 + "nulls": "last"
3941 + }
3942 + ],
3943 + "isUnique": true,
3944 + "concurrently": false,
3945 + "method": "btree",
3946 + "with": {}
3947 + },
3948 + "listings_asset_avail_idx": {
3949 + "name": "listings_asset_avail_idx",
3950 + "columns": [
3951 + {
3952 + "expression": "asset_id",
3953 + "isExpression": false,
3954 + "asc": true,
3955 + "nulls": "last"
3956 + },
3957 + {
3958 + "expression": "availability",
3959 + "isExpression": false,
3960 + "asc": true,
3961 + "nulls": "last"
3962 + }
3963 + ],
3964 + "isUnique": false,
3965 + "concurrently": false,
3966 + "method": "btree",
3967 + "with": {}
3968 + },
3969 + "listings_avail_price_idx": {
3970 + "name": "listings_avail_price_idx",
3971 + "columns": [
3972 + {
3973 + "expression": "availability",
3974 + "isExpression": false,
3975 + "asc": true,
3976 + "nulls": "last"
3977 + },
3978 + {
3979 + "expression": "price_usd",
3980 + "isExpression": false,
3981 + "asc": true,
3982 + "nulls": "last"
3983 + }
3984 + ],
3985 + "isUnique": false,
3986 + "concurrently": false,
3987 + "method": "btree",
3988 + "with": {}
3989 + },
3990 + "listings_ends_idx": {
3991 + "name": "listings_ends_idx",
3992 + "columns": [
3993 + {
3994 + "expression": "ends_at",
3995 + "isExpression": false,
3996 + "asc": true,
3997 + "nulls": "last"
3998 + }
3999 + ],
4000 + "isUnique": false,
4001 + "concurrently": false,
4002 + "method": "btree",
4003 + "with": {}
4004 + },
4005 + "listings_last_seen_idx": {
4006 + "name": "listings_last_seen_idx",
4007 + "columns": [
4008 + {
4009 + "expression": "last_seen_at",
4010 + "isExpression": false,
4011 + "asc": true,
4012 + "nulls": "last"
4013 + }
4014 + ],
4015 + "isUnique": false,
4016 + "concurrently": false,
4017 + "method": "btree",
4018 + "with": {}
4019 + }
4020 + },
4021 + "foreignKeys": {},
4022 + "compositePrimaryKeys": {},
4023 + "uniqueConstraints": {},
4024 + "policies": {},
4025 + "checkConstraints": {},
4026 + "isRLSEnabled": false
4027 + },
4028 + "public.news": {
4029 + "name": "news",
4030 + "schema": "",
4031 + "columns": {
4032 + "id": {
4033 + "name": "id",
4034 + "type": "text",
4035 + "primaryKey": true,
4036 + "notNull": true
4037 + },
4038 + "source_id": {
4039 + "name": "source_id",
4040 + "type": "text",
4041 + "primaryKey": false,
4042 + "notNull": true
4043 + },
4044 + "url": {
4045 + "name": "url",
4046 + "type": "text",
4047 + "primaryKey": false,
4048 + "notNull": true
4049 + },
4050 + "title": {
4051 + "name": "title",
4052 + "type": "text",
4053 + "primaryKey": false,
4054 + "notNull": true
4055 + },
4056 + "summary": {
4057 + "name": "summary",
4058 + "type": "text",
4059 + "primaryKey": false,
4060 + "notNull": false
4061 + },
4062 + "ai_summary": {
4063 + "name": "ai_summary",
4064 + "type": "text",
4065 + "primaryKey": false,
4066 + "notNull": false
4067 + },
4068 + "published_at": {
4069 + "name": "published_at",
4070 + "type": "timestamp with time zone",
4071 + "primaryKey": false,
4072 + "notNull": false
4073 + },
4074 + "category_slugs": {
4075 + "name": "category_slugs",
4076 + "type": "text[]",
4077 + "primaryKey": false,
4078 + "notNull": true,
4079 + "default": "'{}'::text[]"
4080 + },
4081 + "news_type": {
4082 + "name": "news_type",
4083 + "type": "text",
4084 + "primaryKey": false,
4085 + "notNull": false
4086 + },
4087 + "image_url": {
4088 + "name": "image_url",
4089 + "type": "text",
4090 + "primaryKey": false,
4091 + "notNull": false
4092 + },
4093 + "fetched_at": {
4094 + "name": "fetched_at",
4095 + "type": "timestamp with time zone",
4096 + "primaryKey": false,
4097 + "notNull": true
4098 + }
4099 + },
4100 + "indexes": {
4101 + "news_url_uq": {
4102 + "name": "news_url_uq",
4103 + "columns": [
4104 + {
4105 + "expression": "url",
4106 + "isExpression": false,
4107 + "asc": true,
4108 + "nulls": "last"
4109 + }
4110 + ],
4111 + "isUnique": true,
4112 + "concurrently": false,
4113 + "method": "btree",
4114 + "with": {}
4115 + },
4116 + "news_published_idx": {
4117 + "name": "news_published_idx",
4118 + "columns": [
4119 + {
4120 + "expression": "published_at",
4121 + "isExpression": false,
4122 + "asc": true,
4123 + "nulls": "last"
4124 + }
4125 + ],
4126 + "isUnique": false,
4127 + "concurrently": false,
4128 + "method": "btree",
4129 + "with": {}
4130 + }
4131 + },
4132 + "foreignKeys": {},
4133 + "compositePrimaryKeys": {},
4134 + "uniqueConstraints": {},
4135 + "policies": {},
4136 + "checkConstraints": {},
4137 + "isRLSEnabled": false
4138 + },
4139 + "public.price_observations": {
4140 + "name": "price_observations",
4141 + "schema": "",
4142 + "columns": {
4143 + "id": {
4144 + "name": "id",
4145 + "type": "text",
4146 + "primaryKey": true,
4147 + "notNull": true
4148 + },
4149 + "asset_id": {
4150 + "name": "asset_id",
4151 + "type": "text",
4152 + "primaryKey": false,
4153 + "notNull": true
4154 + },
4155 + "variant_id": {
4156 + "name": "variant_id",
4157 + "type": "text",
4158 + "primaryKey": false,
4159 + "notNull": false
4160 + },
4161 + "source_id": {
4162 + "name": "source_id",
4163 + "type": "text",
4164 + "primaryKey": false,
4165 + "notNull": true
4166 + },
4167 + "connector_id": {
4168 + "name": "connector_id",
4169 + "type": "text",
4170 + "primaryKey": false,
4171 + "notNull": true
4172 + },
4173 + "raw_record_id": {
4174 + "name": "raw_record_id",
4175 + "type": "text",
4176 + "primaryKey": false,
4177 + "notNull": false
4178 + },
4179 + "source_url": {
4180 + "name": "source_url",
4181 + "type": "text",
4182 + "primaryKey": false,
4183 + "notNull": true
4184 + },
4185 + "price_kind": {
4186 + "name": "price_kind",
4187 + "type": "text",
4188 + "primaryKey": false,
4189 + "notNull": true
4190 + },
4191 + "price": {
4192 + "name": "price",
4193 + "type": "numeric(18, 4)",
4194 + "primaryKey": false,
4195 + "notNull": true
4196 + },
4197 + "currency": {
4198 + "name": "currency",
4199 + "type": "text",
4200 + "primaryKey": false,
4201 + "notNull": true
4202 + },
4203 + "price_usd": {
4204 + "name": "price_usd",
4205 + "type": "numeric(18, 4)",
4206 + "primaryKey": false,
4207 + "notNull": true
4208 + },
4209 + "observation_date": {
4210 + "name": "observation_date",
4211 + "type": "date",
4212 + "primaryKey": false,
4213 + "notNull": true
4214 + },
4215 + "sample_size": {
4216 + "name": "sample_size",
4217 + "type": "integer",
4218 + "primaryKey": false,
4219 + "notNull": false
4220 + },
4221 + "dedupe_key": {
4222 + "name": "dedupe_key",
4223 + "type": "text",
4224 + "primaryKey": false,
4225 + "notNull": true
4226 + },
4227 + "created_at": {
4228 + "name": "created_at",
4229 + "type": "timestamp with time zone",
4230 + "primaryKey": false,
4231 + "notNull": true,
4232 + "default": "now()"
4233 + }
4234 + },
4235 + "indexes": {
4236 + "price_observations_dedupe_uq": {
4237 + "name": "price_observations_dedupe_uq",
4238 + "columns": [
4239 + {
4240 + "expression": "dedupe_key",
4241 + "isExpression": false,
4242 + "asc": true,
4243 + "nulls": "last"
4244 + }
4245 + ],
4246 + "isUnique": true,
4247 + "concurrently": false,
4248 + "method": "btree",
4249 + "with": {}
4250 + },
4251 + "price_observations_asset_date_idx": {
4252 + "name": "price_observations_asset_date_idx",
4253 + "columns": [
4254 + {
4255 + "expression": "asset_id",
4256 + "isExpression": false,
4257 + "asc": true,
4258 + "nulls": "last"
4259 + },
4260 + {
4261 + "expression": "observation_date",
4262 + "isExpression": false,
4263 + "asc": true,
4264 + "nulls": "last"
4265 + }
4266 + ],
4267 + "isUnique": false,
4268 + "concurrently": false,
4269 + "method": "btree",
4270 + "with": {}
4271 + }
4272 + },
4273 + "foreignKeys": {},
4274 + "compositePrimaryKeys": {},
4275 + "uniqueConstraints": {},
4276 + "policies": {},
4277 + "checkConstraints": {},
4278 + "isRLSEnabled": false
4279 + },
4280 + "public.sales": {
4281 + "name": "sales",
4282 + "schema": "",
4283 + "columns": {
4284 + "id": {
4285 + "name": "id",
4286 + "type": "text",
4287 + "primaryKey": true,
4288 + "notNull": true
4289 + },
4290 + "asset_id": {
4291 + "name": "asset_id",
4292 + "type": "text",
4293 + "primaryKey": false,
4294 + "notNull": true
4295 + },
4296 + "variant_id": {
4297 + "name": "variant_id",
4298 + "type": "text",
4299 + "primaryKey": false,
4300 + "notNull": false
4301 + },
4302 + "source_id": {
4303 + "name": "source_id",
4304 + "type": "text",
4305 + "primaryKey": false,
4306 + "notNull": true
4307 + },
4308 + "connector_id": {
4309 + "name": "connector_id",
4310 + "type": "text",
4311 + "primaryKey": false,
4312 + "notNull": true
4313 + },
4314 + "raw_record_id": {
4315 + "name": "raw_record_id",
4316 + "type": "text",
4317 + "primaryKey": false,
4318 + "notNull": false
4319 + },
4320 + "normalized_record_id": {
4321 + "name": "normalized_record_id",
4322 + "type": "text",
4323 + "primaryKey": false,
4324 + "notNull": false
4325 + },
4326 + "source_url": {
4327 + "name": "source_url",
4328 + "type": "text",
4329 + "primaryKey": false,
4330 + "notNull": true
4331 + },
4332 + "external_id": {
4333 + "name": "external_id",
4334 + "type": "text",
4335 + "primaryKey": false,
4336 + "notNull": false
4337 + },
4338 + "sale_type": {
4339 + "name": "sale_type",
4340 + "type": "text",
4341 + "primaryKey": false,
4342 + "notNull": true,
4343 + "default": "'unknown'"
4344 + },
4345 + "sale_date": {
4346 + "name": "sale_date",
4347 + "type": "timestamp with time zone",
4348 + "primaryKey": false,
4349 + "notNull": true
4350 + },
4351 + "price": {
4352 + "name": "price",
4353 + "type": "numeric(18, 4)",
4354 + "primaryKey": false,
4355 + "notNull": true
4356 + },
4357 + "currency": {
4358 + "name": "currency",
4359 + "type": "text",
4360 + "primaryKey": false,
4361 + "notNull": true
4362 + },
4363 + "price_usd": {
4364 + "name": "price_usd",
4365 + "type": "numeric(18, 4)",
4366 + "primaryKey": false,
4367 + "notNull": true
4368 + },
4369 + "fx_rate": {
4370 + "name": "fx_rate",
4371 + "type": "real",
4372 + "primaryKey": false,
4373 + "notNull": false
4374 + },
4375 + "fx_date": {
4376 + "name": "fx_date",
4377 + "type": "date",
4378 + "primaryKey": false,
4379 + "notNull": false
4380 + },
4381 + "buyer_premium_included": {
4382 + "name": "buyer_premium_included",
4383 + "type": "boolean",
4384 + "primaryKey": false,
4385 + "notNull": false
4386 + },
4387 + "quantity": {
4388 + "name": "quantity",
4389 + "type": "integer",
4390 + "primaryKey": false,
4391 + "notNull": true,
4392 + "default": 1
4393 + },
4394 + "is_bundle": {
4395 + "name": "is_bundle",
4396 + "type": "boolean",
4397 + "primaryKey": false,
4398 + "notNull": true,
4399 + "default": false
4400 + },
4401 + "condition": {
4402 + "name": "condition",
4403 + "type": "text",
4404 + "primaryKey": false,
4405 + "notNull": false
4406 + },
4407 + "grader": {
4408 + "name": "grader",
4409 + "type": "text",
4410 + "primaryKey": false,
4411 + "notNull": false
4412 + },
4413 + "grade": {
4414 + "name": "grade",
4415 + "type": "text",
4416 + "primaryKey": false,
4417 + "notNull": false
4418 + },
4419 + "certification_number": {
4420 + "name": "certification_number",
4421 + "type": "text",
4422 + "primaryKey": false,
4423 + "notNull": false
4424 + },
4425 + "location": {
4426 + "name": "location",
4427 + "type": "text",
4428 + "primaryKey": false,
4429 + "notNull": false
4430 + },
4431 + "auction_house": {
4432 + "name": "auction_house",
4433 + "type": "text",
4434 + "primaryKey": false,
4435 + "notNull": false
4436 + },
4437 + "lot_number": {
4438 + "name": "lot_number",
4439 + "type": "text",
4440 + "primaryKey": false,
4441 + "notNull": false
4442 + },
4443 + "image_urls": {
4444 + "name": "image_urls",
4445 + "type": "jsonb",
4446 + "primaryKey": false,
4447 + "notNull": true,
4448 + "default": "'[]'::jsonb"
4449 + },
4450 + "raw_title": {
4451 + "name": "raw_title",
4452 + "type": "text",
4453 + "primaryKey": false,
4454 + "notNull": true
4455 + },
4456 + "confidence": {
4457 + "name": "confidence",
4458 + "type": "numeric(8, 6)",
4459 + "primaryKey": false,
4460 + "notNull": true,
4461 + "default": 0.8
4462 + },
4463 + "data_quality": {
4464 + "name": "data_quality",
4465 + "type": "real",
4466 + "primaryKey": false,
4467 + "notNull": true,
4468 + "default": 0
4469 + },
4470 + "status": {
4471 + "name": "status",
4472 + "type": "text",
4473 + "primaryKey": false,
4474 + "notNull": true,
4475 + "default": "'valid'"
4476 + },
4477 + "flags": {
4478 + "name": "flags",
4479 + "type": "text[]",
4480 + "primaryKey": false,
4481 + "notNull": true,
4482 + "default": "'{}'::text[]"
4483 + },
4484 + "dedupe_key": {
4485 + "name": "dedupe_key",
4486 + "type": "text",
4487 + "primaryKey": false,
4488 + "notNull": true
4489 + },
4490 + "created_at": {
4491 + "name": "created_at",
4492 + "type": "timestamp with time zone",
4493 + "primaryKey": false,
4494 + "notNull": true,
4495 + "default": "now()"
4496 + }
4497 + },
4498 + "indexes": {
4499 + "sales_dedupe_uq": {
4500 + "name": "sales_dedupe_uq",
4501 + "columns": [
4502 + {
4503 + "expression": "dedupe_key",
4504 + "isExpression": false,
4505 + "asc": true,
4506 + "nulls": "last"
4507 + }
4508 + ],
4509 + "isUnique": true,
4510 + "concurrently": false,
4511 + "method": "btree",
4512 + "with": {}
4513 + },
4514 + "sales_asset_date_idx": {
4515 + "name": "sales_asset_date_idx",
4516 + "columns": [
4517 + {
4518 + "expression": "asset_id",
4519 + "isExpression": false,
4520 + "asc": true,
4521 + "nulls": "last"
4522 + },
4523 + {
4524 + "expression": "sale_date",
4525 + "isExpression": false,
4526 + "asc": true,
4527 + "nulls": "last"
4528 + }
4529 + ],
4530 + "isUnique": false,
4531 + "concurrently": false,
4532 + "method": "btree",
4533 + "with": {}
4534 + },
4535 + "sales_variant_date_idx": {
4536 + "name": "sales_variant_date_idx",
4537 + "columns": [
4538 + {
4539 + "expression": "variant_id",
4540 + "isExpression": false,
4541 + "asc": true,
4542 + "nulls": "last"
4543 + },
4544 + {
4545 + "expression": "sale_date",
4546 + "isExpression": false,
4547 + "asc": true,
4548 + "nulls": "last"
4549 + }
4550 + ],
4551 + "isUnique": false,
4552 + "concurrently": false,
4553 + "method": "btree",
4554 + "with": {}
4555 + },
4556 + "sales_source_idx": {
4557 + "name": "sales_source_idx",
4558 + "columns": [
4559 + {
4560 + "expression": "source_id",
4561 + "isExpression": false,
4562 + "asc": true,
4563 + "nulls": "last"
4564 + },
4565 + {
4566 + "expression": "sale_date",
4567 + "isExpression": false,
4568 + "asc": true,
4569 + "nulls": "last"
4570 + }
4571 + ],
4572 + "isUnique": false,
4573 + "concurrently": false,
4574 + "method": "btree",
4575 + "with": {}
4576 + },
4577 + "sales_date_idx": {
4578 + "name": "sales_date_idx",
4579 + "columns": [
4580 + {
4581 + "expression": "sale_date",
4582 + "isExpression": false,
4583 + "asc": true,
4584 + "nulls": "last"
4585 + }
4586 + ],
4587 + "isUnique": false,
4588 + "concurrently": false,
4589 + "method": "btree",
4590 + "with": {}
4591 + },
4592 + "sales_price_idx": {
4593 + "name": "sales_price_idx",
4594 + "columns": [
4595 + {
4596 + "expression": "price_usd",
4597 + "isExpression": false,
4598 + "asc": true,
4599 + "nulls": "last"
4600 + }
4601 + ],
4602 + "isUnique": false,
4603 + "concurrently": false,
4604 + "method": "btree",
4605 + "with": {}
4606 + }
4607 + },
4608 + "foreignKeys": {},
4609 + "compositePrimaryKeys": {},
4610 + "uniqueConstraints": {},
4611 + "policies": {},
4612 + "checkConstraints": {},
4613 + "isRLSEnabled": false
4614 + },
4615 + "public.benchmarks": {
4616 + "name": "benchmarks",
4617 + "schema": "",
4618 + "columns": {
4619 + "ticker": {
4620 + "name": "ticker",
4621 + "type": "text",
4622 + "primaryKey": false,
4623 + "notNull": true
4624 + },
4625 + "date": {
4626 + "name": "date",
4627 + "type": "date",
4628 + "primaryKey": false,
4629 + "notNull": true
4630 + },
4631 + "value": {
4632 + "name": "value",
4633 + "type": "real",
4634 + "primaryKey": false,
4635 + "notNull": true
4636 + },
4637 + "source": {
4638 + "name": "source",
4639 + "type": "text",
4640 + "primaryKey": false,
4641 + "notNull": true
4642 + }
4643 + },
4644 + "indexes": {},
4645 + "foreignKeys": {},
4646 + "compositePrimaryKeys": {
4647 + "benchmarks_ticker_date_pk": {
4648 + "name": "benchmarks_ticker_date_pk",
4649 + "columns": [
4650 + "ticker",
4651 + "date"
4652 + ]
4653 + }
4654 + },
4655 + "uniqueConstraints": {},
4656 + "policies": {},
4657 + "checkConstraints": {},
4658 + "isRLSEnabled": false
4659 + },
4660 + "public.category_snapshots": {
4661 + "name": "category_snapshots",
4662 + "schema": "",
4663 + "columns": {
4664 + "category_slug": {
4665 + "name": "category_slug",
4666 + "type": "text",
4667 + "primaryKey": false,
4668 + "notNull": true
4669 + },
4670 + "date": {
4671 + "name": "date",
4672 + "type": "date",
4673 + "primaryKey": false,
4674 + "notNull": true
4675 + },
4676 + "index_value": {
4677 + "name": "index_value",
4678 + "type": "real",
4679 + "primaryKey": false,
4680 + "notNull": false
4681 + },
4682 + "tracked_assets": {
4683 + "name": "tracked_assets",
4684 + "type": "integer",
4685 + "primaryKey": false,
4686 + "notNull": true,
4687 + "default": 0
4688 + },
4689 + "assets_with_valuation": {
4690 + "name": "assets_with_valuation",
4691 + "type": "integer",
4692 + "primaryKey": false,
4693 + "notNull": true,
4694 + "default": 0
4695 + },
4696 + "sales": {
4697 + "name": "sales",
4698 + "type": "integer",
4699 + "primaryKey": false,
4700 + "notNull": true,
4701 + "default": 0
4702 + },
4703 + "volume_usd": {
4704 + "name": "volume_usd",
4705 + "type": "numeric(18, 4)",
4706 + "primaryKey": false,
4707 + "notNull": false
4708 + },
4709 + "median_sale_usd": {
4710 + "name": "median_sale_usd",
4711 + "type": "numeric(18, 4)",
4712 + "primaryKey": false,
4713 + "notNull": false
4714 + },
4715 + "active_listings": {
4716 + "name": "active_listings",
4717 + "type": "integer",
4718 + "primaryKey": false,
4719 + "notNull": true,
4720 + "default": 0
4721 + },
4722 + "market_cap_est_usd": {
4723 + "name": "market_cap_est_usd",
4724 + "type": "numeric(18, 4)",
4725 + "primaryKey": false,
4726 + "notNull": false
4727 + },
4728 + "liquidity_score": {
4729 + "name": "liquidity_score",
4730 + "type": "real",
4731 + "primaryKey": false,
4732 + "notNull": false
4733 + },
4734 + "change_1d": {
4735 + "name": "change_1d",
4736 + "type": "numeric(8, 6)",
4737 + "primaryKey": false,
4738 + "notNull": false
4739 + },
4740 + "change_7d": {
4741 + "name": "change_7d",
4742 + "type": "numeric(8, 6)",
4743 + "primaryKey": false,
4744 + "notNull": false
4745 + },
4746 + "change_30d": {
4747 + "name": "change_30d",
4748 + "type": "numeric(8, 6)",
4749 + "primaryKey": false,
4750 + "notNull": false
4751 + },
4752 + "change_1y": {
4753 + "name": "change_1y",
4754 + "type": "numeric(8, 6)",
4755 + "primaryKey": false,
4756 + "notNull": false
4757 + }
4758 + },
4759 + "indexes": {},
4760 + "foreignKeys": {},
4761 + "compositePrimaryKeys": {
4762 + "category_snapshots_category_slug_date_pk": {
4763 + "name": "category_snapshots_category_slug_date_pk",
4764 + "columns": [
4765 + "category_slug",
4766 + "date"
4767 + ]
4768 + }
4769 + },
4770 + "uniqueConstraints": {},
4771 + "policies": {},
4772 + "checkConstraints": {},
4773 + "isRLSEnabled": false
4774 + },
4775 + "public.correlations": {
4776 + "name": "correlations",
4777 + "schema": "",
4778 + "columns": {
4779 + "a": {
4780 + "name": "a",
4781 + "type": "text",
4782 + "primaryKey": false,
4783 + "notNull": true
4784 + },
4785 + "b": {
4786 + "name": "b",
4787 + "type": "text",
4788 + "primaryKey": false,
4789 + "notNull": true
4790 + },
4791 + "window_days": {
4792 + "name": "window_days",
4793 + "type": "integer",
4794 + "primaryKey": false,
4795 + "notNull": true
4796 + },
4797 + "coefficient": {
4798 + "name": "coefficient",
4799 + "type": "real",
4800 + "primaryKey": false,
4801 + "notNull": true
4802 + },
4803 + "observations": {
4804 + "name": "observations",
4805 + "type": "integer",
4806 + "primaryKey": false,
4807 + "notNull": true
4808 + },
4809 + "computed_at": {
4810 + "name": "computed_at",
4811 + "type": "timestamp with time zone",
4812 + "primaryKey": false,
4813 + "notNull": true
4814 + }
4815 + },
4816 + "indexes": {},
4817 + "foreignKeys": {},
4818 + "compositePrimaryKeys": {
4819 + "correlations_a_b_window_days_pk": {
4820 + "name": "correlations_a_b_window_days_pk",
4821 + "columns": [
4822 + "a",
4823 + "b",
4824 + "window_days"
4825 + ]
4826 + }
4827 + },
4828 + "uniqueConstraints": {},
4829 + "policies": {},
4830 + "checkConstraints": {},
4831 + "isRLSEnabled": false
4832 + },
4833 + "public.index_constituents": {
4834 + "name": "index_constituents",
4835 + "schema": "",
4836 + "columns": {
4837 + "index_id": {
4838 + "name": "index_id",
4839 + "type": "text",
4840 + "primaryKey": false,
4841 + "notNull": true
4842 + },
4843 + "asset_id": {
4844 + "name": "asset_id",
4845 + "type": "text",
4846 + "primaryKey": false,
4847 + "notNull": true
4848 + },
4849 + "variant_id": {
4850 + "name": "variant_id",
4851 + "type": "text",
4852 + "primaryKey": false,
4853 + "notNull": true,
4854 + "default": "''"
4855 + },
4856 + "weight": {
4857 + "name": "weight",
4858 + "type": "real",
4859 + "primaryKey": false,
4860 + "notNull": true,
4861 + "default": 1
4862 + },
4863 + "added_at": {
4864 + "name": "added_at",
4865 + "type": "date",
4866 + "primaryKey": false,
4867 + "notNull": true
4868 + },
4869 + "removed_at": {
4870 + "name": "removed_at",
4871 + "type": "date",
4872 + "primaryKey": false,
4873 + "notNull": false
4874 + },
4875 + "reason": {
4876 + "name": "reason",
4877 + "type": "text",
4878 + "primaryKey": false,
4879 + "notNull": false
4880 + }
4881 + },
4882 + "indexes": {
4883 + "index_constituents_asset_idx": {
4884 + "name": "index_constituents_asset_idx",
4885 + "columns": [
4886 + {
4887 + "expression": "asset_id",
4888 + "isExpression": false,
4889 + "asc": true,
4890 + "nulls": "last"
4891 + }
4892 + ],
4893 + "isUnique": false,
4894 + "concurrently": false,
4895 + "method": "btree",
4896 + "with": {}
4897 + }
4898 + },
4899 + "foreignKeys": {},
4900 + "compositePrimaryKeys": {
4901 + "index_constituents_index_id_asset_id_variant_id_added_at_pk": {
4902 + "name": "index_constituents_index_id_asset_id_variant_id_added_at_pk",
4903 + "columns": [
4904 + "index_id",
4905 + "asset_id",
4906 + "variant_id",
4907 + "added_at"
4908 + ]
4909 + }
4910 + },
4911 + "uniqueConstraints": {},
4912 + "policies": {},
4913 + "checkConstraints": {},
4914 + "isRLSEnabled": false
4915 + },
4916 + "public.index_values": {
4917 + "name": "index_values",
4918 + "schema": "",
4919 + "columns": {
4920 + "index_id": {
4921 + "name": "index_id",
4922 + "type": "text",
4923 + "primaryKey": false,
4924 + "notNull": true
4925 + },
4926 + "date": {
4927 + "name": "date",
4928 + "type": "date",
4929 + "primaryKey": false,
4930 + "notNull": true
4931 + },
4932 + "value": {
4933 + "name": "value",
4934 + "type": "real",
4935 + "primaryKey": false,
4936 + "notNull": true
4937 + },
4938 + "constituents_count": {
4939 + "name": "constituents_count",
4940 + "type": "integer",
4941 + "primaryKey": false,
4942 + "notNull": true,
4943 + "default": 0
4944 + },
4945 + "transactions": {
4946 + "name": "transactions",
4947 + "type": "integer",
4948 + "primaryKey": false,
4949 + "notNull": true,
4950 + "default": 0
4951 + },
4952 + "volume_usd": {
4953 + "name": "volume_usd",
4954 + "type": "numeric(18, 4)",
4955 + "primaryKey": false,
4956 + "notNull": false
4957 + },
4958 + "median_sale_usd": {
4959 + "name": "median_sale_usd",
4960 + "type": "numeric(18, 4)",
4961 + "primaryKey": false,
4962 + "notNull": false
4963 + },
4964 + "avg_sale_usd": {
4965 + "name": "avg_sale_usd",
4966 + "type": "numeric(18, 4)",
4967 + "primaryKey": false,
4968 + "notNull": false
4969 + },
4970 + "market_cap_est_usd": {
4971 + "name": "market_cap_est_usd",
4972 + "type": "numeric(18, 4)",
4973 + "primaryKey": false,
4974 + "notNull": false
4975 + },
4976 + "market_cap_confidence": {
4977 + "name": "market_cap_confidence",
4978 + "type": "text",
4979 + "primaryKey": false,
4980 + "notNull": false
4981 + },
4982 + "liquidity_score": {
4983 + "name": "liquidity_score",
4984 + "type": "real",
4985 + "primaryKey": false,
4986 + "notNull": false
4987 + },
4988 + "momentum": {
4989 + "name": "momentum",
4990 + "type": "real",
4991 + "primaryKey": false,
4992 + "notNull": false
4993 + },
4994 + "breadth": {
4995 + "name": "breadth",
4996 + "type": "integer",
4997 + "primaryKey": false,
4998 + "notNull": false
4999 + },
5000 + "tracked_assets": {
5001 + "name": "tracked_assets",
5002 + "type": "integer",
5003 + "primaryKey": false,
5004 + "notNull": false
5005 + },
5006 + "coverage": {
5007 + "name": "coverage",
5008 + "type": "real",
5009 + "primaryKey": false,
5010 + "notNull": false
5011 + }
5012 + },
5013 + "indexes": {},
5014 + "foreignKeys": {},
5015 + "compositePrimaryKeys": {
5016 + "index_values_index_id_date_pk": {
5017 + "name": "index_values_index_id_date_pk",
5018 + "columns": [
5019 + "index_id",
5020 + "date"
5021 + ]
5022 + }
5023 + },
5024 + "uniqueConstraints": {},
5025 + "policies": {},
5026 + "checkConstraints": {},
5027 + "isRLSEnabled": false
5028 + },
5029 + "public.indices": {
5030 + "name": "indices",
5031 + "schema": "",
5032 + "columns": {
5033 + "id": {
5034 + "name": "id",
5035 + "type": "text",
5036 + "primaryKey": true,
5037 + "notNull": true
5038 + },
5039 + "ticker": {
5040 + "name": "ticker",
5041 + "type": "text",
5042 + "primaryKey": false,
5043 + "notNull": true
5044 + },
5045 + "name": {
5046 + "name": "name",
5047 + "type": "text",
5048 + "primaryKey": false,
5049 + "notNull": true
5050 + },
5051 + "description": {
5052 + "name": "description",
5053 + "type": "text",
5054 + "primaryKey": false,
5055 + "notNull": false
5056 + },
5057 + "category_slugs": {
5058 + "name": "category_slugs",
5059 + "type": "text[]",
5060 + "primaryKey": false,
5061 + "notNull": true,
5062 + "default": "'{}'::text[]"
5063 + },
5064 + "family_slugs": {
5065 + "name": "family_slugs",
5066 + "type": "text[]",
5067 + "primaryKey": false,
5068 + "notNull": true,
5069 + "default": "'{}'::text[]"
5070 + },
5071 + "parent_ticker": {
5072 + "name": "parent_ticker",
5073 + "type": "text",
5074 + "primaryKey": false,
5075 + "notNull": false
5076 + },
5077 + "methodology": {
5078 + "name": "methodology",
5079 + "type": "text",
5080 + "primaryKey": false,
5081 + "notNull": true,
5082 + "default": "'chain_linked_equal_weight_v1'"
5083 + },
5084 + "weighting": {
5085 + "name": "weighting",
5086 + "type": "text",
5087 + "primaryKey": false,
5088 + "notNull": true,
5089 + "default": "'equal'"
5090 + },
5091 + "base_date": {
5092 + "name": "base_date",
5093 + "type": "date",
5094 + "primaryKey": false,
5095 + "notNull": true
5096 + },
5097 + "base_value": {
5098 + "name": "base_value",
5099 + "type": "real",
5100 + "primaryKey": false,
5101 + "notNull": true,
5102 + "default": 1000
5103 + },
5104 + "min_constituents": {
5105 + "name": "min_constituents",
5106 + "type": "integer",
5107 + "primaryKey": false,
5108 + "notNull": true,
5109 + "default": 10
5110 + },
5111 + "active": {
5112 + "name": "active",
5113 + "type": "boolean",
5114 + "primaryKey": false,
5115 + "notNull": true,
5116 + "default": true
5117 + },
5118 + "is_flagship": {
5119 + "name": "is_flagship",
5120 + "type": "boolean",
5121 + "primaryKey": false,
5122 + "notNull": true,
5123 + "default": false
5124 + },
5125 + "color": {
5126 + "name": "color",
5127 + "type": "text",
5128 + "primaryKey": false,
5129 + "notNull": false
5130 + },
5131 + "created_at": {
5132 + "name": "created_at",
5133 + "type": "timestamp with time zone",
5134 + "primaryKey": false,
5135 + "notNull": true,
5136 + "default": "now()"
5137 + }
5138 + },
5139 + "indexes": {},
5140 + "foreignKeys": {},
5141 + "compositePrimaryKeys": {},
5142 + "uniqueConstraints": {
5143 + "indices_ticker_unique": {
5144 + "name": "indices_ticker_unique",
5145 + "nullsNotDistinct": false,
5146 + "columns": [
5147 + "ticker"
5148 + ]
5149 + }
5150 + },
5151 + "policies": {},
5152 + "checkConstraints": {},
5153 + "isRLSEnabled": false
5154 + },
5155 + "public.price_snapshots": {
5156 + "name": "price_snapshots",
5157 + "schema": "",
5158 + "columns": {
5159 + "asset_id": {
5160 + "name": "asset_id",
5161 + "type": "text",
5162 + "primaryKey": false,
5163 + "notNull": true
5164 + },
5165 + "variant_id": {
5166 + "name": "variant_id",
5167 + "type": "text",
5168 + "primaryKey": false,
5169 + "notNull": true,
5170 + "default": "''"
5171 + },
5172 + "date": {
5173 + "name": "date",
5174 + "type": "date",
5175 + "primaryKey": false,
5176 + "notNull": true
5177 + },
5178 + "riv_usd": {
5179 + "name": "riv_usd",
5180 + "type": "numeric(18, 4)",
5181 + "primaryKey": false,
5182 + "notNull": false
5183 + },
5184 + "latest_sale_usd": {
5185 + "name": "latest_sale_usd",
5186 + "type": "numeric(18, 4)",
5187 + "primaryKey": false,
5188 + "notNull": false
5189 + },
5190 + "median_usd": {
5191 + "name": "median_usd",
5192 + "type": "numeric(18, 4)",
5193 + "primaryKey": false,
5194 + "notNull": false
5195 + },
5196 + "sales_count": {
5197 + "name": "sales_count",
5198 + "type": "integer",
5199 + "primaryKey": false,
5200 + "notNull": true,
5201 + "default": 0
5202 + },
5203 + "volume_usd": {
5204 + "name": "volume_usd",
5205 + "type": "numeric(18, 4)",
5206 + "primaryKey": false,
5207 + "notNull": false
5208 + },
5209 + "listings_count": {
5210 + "name": "listings_count",
5211 + "type": "integer",
5212 + "primaryKey": false,
5213 + "notNull": true,
5214 + "default": 0
5215 + },
5216 + "min_ask_usd": {
5217 + "name": "min_ask_usd",
5218 + "type": "numeric(18, 4)",
5219 + "primaryKey": false,
5220 + "notNull": false
5221 + },
5222 + "observation_usd": {
5223 + "name": "observation_usd",
5224 + "type": "numeric(18, 4)",
5225 + "primaryKey": false,
5226 + "notNull": false
5227 + }
5228 + },
5229 + "indexes": {
5230 + "price_snapshots_date_idx": {
5231 + "name": "price_snapshots_date_idx",
5232 + "columns": [
5233 + {
5234 + "expression": "date",
5235 + "isExpression": false,
5236 + "asc": true,
5237 + "nulls": "last"
5238 + }
5239 + ],
5240 + "isUnique": false,
5241 + "concurrently": false,
5242 + "method": "btree",
5243 + "with": {}
5244 + }
5245 + },
5246 + "foreignKeys": {},
5247 + "compositePrimaryKeys": {
5248 + "price_snapshots_asset_id_variant_id_date_pk": {
5249 + "name": "price_snapshots_asset_id_variant_id_date_pk",
5250 + "columns": [
5251 + "asset_id",
5252 + "variant_id",
5253 + "date"
5254 + ]
5255 + }
5256 + },
5257 + "uniqueConstraints": {},
5258 + "policies": {},
5259 + "checkConstraints": {},
5260 + "isRLSEnabled": false
5261 + },
5262 + "public.radar_findings": {
5263 + "name": "radar_findings",
5264 + "schema": "",
5265 + "columns": {
5266 + "id": {
5267 + "name": "id",
5268 + "type": "text",
5269 + "primaryKey": true,
5270 + "notNull": true
5271 + },
5272 + "asset_id": {
5273 + "name": "asset_id",
5274 + "type": "text",
5275 + "primaryKey": false,
5276 + "notNull": true
5277 + },
5278 + "kind": {
5279 + "name": "kind",
5280 + "type": "text",
5281 + "primaryKey": false,
5282 + "notNull": true
5283 + },
5284 + "score": {
5285 + "name": "score",
5286 + "type": "real",
5287 + "primaryKey": false,
5288 + "notNull": true
5289 + },
5290 + "evidence": {
5291 + "name": "evidence",
5292 + "type": "jsonb",
5293 + "primaryKey": false,
5294 + "notNull": true,
5295 + "default": "'{}'::jsonb"
5296 + },
5297 + "entity_type": {
5298 + "name": "entity_type",
5299 + "type": "text",
5300 + "primaryKey": false,
5301 + "notNull": false
5302 + },
5303 + "entity_id": {
5304 + "name": "entity_id",
5305 + "type": "text",
5306 + "primaryKey": false,
5307 + "notNull": false
5308 + },
5309 + "detected_at": {
5310 + "name": "detected_at",
5311 + "type": "timestamp with time zone",
5312 + "primaryKey": false,
5313 + "notNull": true
5314 + },
5315 + "expires_at": {
5316 + "name": "expires_at",
5317 + "type": "timestamp with time zone",
5318 + "primaryKey": false,
5319 + "notNull": false
5320 + }
5321 + },
5322 + "indexes": {
5323 + "radar_kind_idx": {
5324 + "name": "radar_kind_idx",
5325 + "columns": [
5326 + {
5327 + "expression": "kind",
5328 + "isExpression": false,
5329 + "asc": true,
5330 + "nulls": "last"
5331 + },
5332 + {
5333 + "expression": "detected_at",
5334 + "isExpression": false,
5335 + "asc": true,
5336 + "nulls": "last"
5337 + }
5338 + ],
5339 + "isUnique": false,
5340 + "concurrently": false,
5341 + "method": "btree",
5342 + "with": {}
5343 + },
5344 + "radar_entity_uq": {
5345 + "name": "radar_entity_uq",
5346 + "columns": [
5347 + {
5348 + "expression": "kind",
5349 + "isExpression": false,
5350 + "asc": true,
5351 + "nulls": "last"
5352 + },
5353 + {
5354 + "expression": "entity_type",
5355 + "isExpression": false,
5356 + "asc": true,
5357 + "nulls": "last"
5358 + },
5359 + {
5360 + "expression": "entity_id",
5361 + "isExpression": false,
5362 + "asc": true,
5363 + "nulls": "last"
5364 + }
5365 + ],
5366 + "isUnique": true,
5367 + "concurrently": false,
5368 + "method": "btree",
5369 + "with": {}
5370 + }
5371 + },
5372 + "foreignKeys": {},
5373 + "compositePrimaryKeys": {},
5374 + "uniqueConstraints": {},
5375 + "policies": {},
5376 + "checkConstraints": {},
5377 + "isRLSEnabled": false
5378 + },
5379 + "public.valuations": {
5380 + "name": "valuations",
5381 + "schema": "",
5382 + "columns": {
5383 + "id": {
5384 + "name": "id",
5385 + "type": "text",
5386 + "primaryKey": true,
5387 + "notNull": true
5388 + },
5389 + "asset_id": {
5390 + "name": "asset_id",
5391 + "type": "text",
5392 + "primaryKey": false,
5393 + "notNull": true
5394 + },
5395 + "variant_id": {
5396 + "name": "variant_id",
5397 + "type": "text",
5398 + "primaryKey": false,
5399 + "notNull": false
5400 + },
5401 + "computed_at": {
5402 + "name": "computed_at",
5403 + "type": "timestamp with time zone",
5404 + "primaryKey": false,
5405 + "notNull": true
5406 + },
5407 + "riv_usd": {
5408 + "name": "riv_usd",
5409 + "type": "numeric(18, 4)",
5410 + "primaryKey": false,
5411 + "notNull": false
5412 + },
5413 + "low_usd": {
5414 + "name": "low_usd",
5415 + "type": "numeric(18, 4)",
5416 + "primaryKey": false,
5417 + "notNull": false
5418 + },
5419 + "high_usd": {
5420 + "name": "high_usd",
5421 + "type": "numeric(18, 4)",
5422 + "primaryKey": false,
5423 + "notNull": false
5424 + },
5425 + "confidence": {
5426 + "name": "confidence",
5427 + "type": "numeric(8, 6)",
5428 + "primaryKey": false,
5429 + "notNull": true,
5430 + "default": 0
5431 + },
5432 + "confidence_label": {
5433 + "name": "confidence_label",
5434 + "type": "text",
5435 + "primaryKey": false,
5436 + "notNull": true,
5437 + "default": "'insufficient'"
5438 + },
5439 + "sample_size": {
5440 + "name": "sample_size",
5441 + "type": "integer",
5442 + "primaryKey": false,
5443 + "notNull": true,
5444 + "default": 0
5445 + },
5446 + "window_days": {
5447 + "name": "window_days",
5448 + "type": "integer",
5449 + "primaryKey": false,
5450 + "notNull": true,
5451 + "default": 365
5452 + },
5453 + "methods": {
5454 + "name": "methods",
5455 + "type": "jsonb",
5456 + "primaryKey": false,
5457 + "notNull": true,
5458 + "default": "'{}'::jsonb"
5459 + },
5460 + "sales_used": {
5461 + "name": "sales_used",
5462 + "type": "text[]",
5463 + "primaryKey": false,
5464 + "notNull": true,
5465 + "default": "'{}'::text[]"
5466 + },
5467 + "observations_used": {
5468 + "name": "observations_used",
5469 + "type": "integer",
5470 + "primaryKey": false,
5471 + "notNull": true,
5472 + "default": 0
5473 + },
5474 + "method": {
5475 + "name": "method",
5476 + "type": "text",
5477 + "primaryKey": false,
5478 + "notNull": true,
5479 + "default": "'ensemble_v1'"
5480 + },
5481 + "notes": {
5482 + "name": "notes",
5483 + "type": "text[]",
5484 + "primaryKey": false,
5485 + "notNull": true,
5486 + "default": "'{}'::text[]"
5487 + }
5488 + },
5489 + "indexes": {
5490 + "valuations_asset_idx": {
5491 + "name": "valuations_asset_idx",
5492 + "columns": [
5493 + {
5494 + "expression": "asset_id",
5495 + "isExpression": false,
5496 + "asc": true,
5497 + "nulls": "last"
5498 + },
5499 + {
5500 + "expression": "computed_at",
5501 + "isExpression": false,
5502 + "asc": true,
5503 + "nulls": "last"
5504 + }
5505 + ],
5506 + "isUnique": false,
5507 + "concurrently": false,
5508 + "method": "btree",
5509 + "with": {}
5510 + },
5511 + "valuations_variant_idx": {
5512 + "name": "valuations_variant_idx",
5513 + "columns": [
5514 + {
5515 + "expression": "variant_id",
5516 + "isExpression": false,
5517 + "asc": true,
5518 + "nulls": "last"
5519 + },
5520 + {
5521 + "expression": "computed_at",
5522 + "isExpression": false,
5523 + "asc": true,
5524 + "nulls": "last"
5525 + }
5526 + ],
5527 + "isUnique": false,
5528 + "concurrently": false,
5529 + "method": "btree",
5530 + "with": {}
5531 + }
5532 + },
5533 + "foreignKeys": {},
5534 + "compositePrimaryKeys": {},
5535 + "uniqueConstraints": {},
5536 + "policies": {},
5537 + "checkConstraints": {},
5538 + "isRLSEnabled": false
5539 + },
5540 + "public.alert_events": {
5541 + "name": "alert_events",
5542 + "schema": "",
5543 + "columns": {
5544 + "id": {
5545 + "name": "id",
5546 + "type": "text",
5547 + "primaryKey": true,
5548 + "notNull": true
5549 + },
5550 + "alert_id": {
5551 + "name": "alert_id",
5552 + "type": "text",
5553 + "primaryKey": false,
5554 + "notNull": true
5555 + },
5556 + "user_id": {
5557 + "name": "user_id",
5558 + "type": "text",
5559 + "primaryKey": false,
5560 + "notNull": true
5561 + },
5562 + "message": {
5563 + "name": "message",
5564 + "type": "text",
5565 + "primaryKey": false,
5566 + "notNull": true
5567 + },
5568 + "payload": {
5569 + "name": "payload",
5570 + "type": "jsonb",
5571 + "primaryKey": false,
5572 + "notNull": true,
5573 + "default": "'{}'::jsonb"
5574 + },
5575 + "read_at": {
5576 + "name": "read_at",
5577 + "type": "timestamp with time zone",
5578 + "primaryKey": false,
5579 + "notNull": false
5580 + },
5581 + "created_at": {
5582 + "name": "created_at",
5583 + "type": "timestamp with time zone",
5584 + "primaryKey": false,
5585 + "notNull": true,
5586 + "default": "now()"
5587 + }
5588 + },
5589 + "indexes": {
5590 + "alert_events_user_idx": {
5591 + "name": "alert_events_user_idx",
5592 + "columns": [
5593 + {
5594 + "expression": "user_id",
5595 + "isExpression": false,
5596 + "asc": true,
5597 + "nulls": "last"
5598 + },
5599 + {
5600 + "expression": "created_at",
5601 + "isExpression": false,
5602 + "asc": true,
5603 + "nulls": "last"
5604 + }
5605 + ],
5606 + "isUnique": false,
5607 + "concurrently": false,
5608 + "method": "btree",
5609 + "with": {}
5610 + }
5611 + },
5612 + "foreignKeys": {},
5613 + "compositePrimaryKeys": {},
5614 + "uniqueConstraints": {},
5615 + "policies": {},
5616 + "checkConstraints": {},
5617 + "isRLSEnabled": false
5618 + },
5619 + "public.alerts": {
5620 + "name": "alerts",
5621 + "schema": "",
5622 + "columns": {
5623 + "id": {
5624 + "name": "id",
5625 + "type": "text",
5626 + "primaryKey": true,
5627 + "notNull": true
5628 + },
5629 + "user_id": {
5630 + "name": "user_id",
5631 + "type": "text",
5632 + "primaryKey": false,
5633 + "notNull": true
5634 + },
5635 + "alert_type": {
5636 + "name": "alert_type",
5637 + "type": "text",
5638 + "primaryKey": false,
5639 + "notNull": true
5640 + },
5641 + "target_type": {
5642 + "name": "target_type",
5643 + "type": "text",
5644 + "primaryKey": false,
5645 + "notNull": true
5646 + },
5647 + "target_id": {
5648 + "name": "target_id",
5649 + "type": "text",
5650 + "primaryKey": false,
5651 + "notNull": true
5652 + },
5653 + "threshold": {
5654 + "name": "threshold",
5655 + "type": "numeric(18, 4)",
5656 + "primaryKey": false,
5657 + "notNull": false
5658 + },
5659 + "currency": {
5660 + "name": "currency",
5661 + "type": "text",
5662 + "primaryKey": false,
5663 + "notNull": false
5664 + },
5665 + "params": {
5666 + "name": "params",
5667 + "type": "jsonb",
5668 + "primaryKey": false,
5669 + "notNull": true,
5670 + "default": "'{}'::jsonb"
5671 + },
5672 + "channel": {
5673 + "name": "channel",
5674 + "type": "text",
5675 + "primaryKey": false,
5676 + "notNull": true,
5677 + "default": "'inapp'"
5678 + },
5679 + "active": {
5680 + "name": "active",
5681 + "type": "boolean",
5682 + "primaryKey": false,
5683 + "notNull": true,
5684 + "default": true
5685 + },
5686 + "name": {
5687 + "name": "name",
5688 + "type": "text",
5689 + "primaryKey": false,
5690 + "notNull": false
5691 + },
5692 + "cooldown_minutes": {
5693 + "name": "cooldown_minutes",
5694 + "type": "integer",
5695 + "primaryKey": false,
5696 + "notNull": true,
5697 + "default": 1440
5698 + },
5699 + "last_triggered_at": {
5700 + "name": "last_triggered_at",
5701 + "type": "timestamp with time zone",
5702 + "primaryKey": false,
5703 + "notNull": false
5704 + },
5705 + "trigger_count": {
5706 + "name": "trigger_count",
5707 + "type": "integer",
5708 + "primaryKey": false,
5709 + "notNull": true,
5710 + "default": 0
5711 + },
5712 + "created_at": {
5713 + "name": "created_at",
5714 + "type": "timestamp with time zone",
5715 + "primaryKey": false,
5716 + "notNull": true,
5717 + "default": "now()"
5718 + }
5719 + },
5720 + "indexes": {
5721 + "alerts_user_idx": {
5722 + "name": "alerts_user_idx",
5723 + "columns": [
5724 + {
5725 + "expression": "user_id",
5726 + "isExpression": false,
5727 + "asc": true,
5728 + "nulls": "last"
5729 + }
5730 + ],
5731 + "isUnique": false,
5732 + "concurrently": false,
5733 + "method": "btree",
5734 + "with": {}
5735 + },
5736 + "alerts_target_idx": {
5737 + "name": "alerts_target_idx",
5738 + "columns": [
5739 + {
5740 + "expression": "target_type",
5741 + "isExpression": false,
5742 + "asc": true,
5743 + "nulls": "last"
5744 + },
5745 + {
5746 + "expression": "target_id",
5747 + "isExpression": false,
5748 + "asc": true,
5749 + "nulls": "last"
5750 + },
5751 + {
5752 + "expression": "active",
5753 + "isExpression": false,
5754 + "asc": true,
5755 + "nulls": "last"
5756 + }
5757 + ],
5758 + "isUnique": false,
5759 + "concurrently": false,
5760 + "method": "btree",
5761 + "with": {}
5762 + }
5763 + },
5764 + "foreignKeys": {},
5765 + "compositePrimaryKeys": {},
5766 + "uniqueConstraints": {},
5767 + "policies": {},
5768 + "checkConstraints": {},
5769 + "isRLSEnabled": false
5770 + },
5771 + "public.api_keys": {
5772 + "name": "api_keys",
5773 + "schema": "",
5774 + "columns": {
5775 + "id": {
5776 + "name": "id",
5777 + "type": "text",
5778 + "primaryKey": true,
5779 + "notNull": true
5780 + },
5781 + "user_id": {
5782 + "name": "user_id",
5783 + "type": "text",
5784 + "primaryKey": false,
5785 + "notNull": false
5786 + },
5787 + "name": {
5788 + "name": "name",
5789 + "type": "text",
5790 + "primaryKey": false,
5791 + "notNull": true
5792 + },
5793 + "prefix": {
5794 + "name": "prefix",
5795 + "type": "text",
5796 + "primaryKey": false,
5797 + "notNull": true
5798 + },
5799 + "key_hash": {
5800 + "name": "key_hash",
5801 + "type": "text",
5802 + "primaryKey": false,
5803 + "notNull": true
5804 + },
5805 + "tier": {
5806 + "name": "tier",
5807 + "type": "text",
5808 + "primaryKey": false,
5809 + "notNull": true,
5810 + "default": "'free'"
5811 + },
5812 + "rate_limit_per_minute": {
5813 + "name": "rate_limit_per_minute",
5814 + "type": "integer",
5815 + "primaryKey": false,
5816 + "notNull": true,
5817 + "default": 60
5818 + },
5819 + "daily_quota": {
5820 + "name": "daily_quota",
5821 + "type": "integer",
5822 + "primaryKey": false,
5823 + "notNull": true,
5824 + "default": 1000
5825 + },
5826 + "created_at": {
5827 + "name": "created_at",
5828 + "type": "timestamp with time zone",
5829 + "primaryKey": false,
5830 + "notNull": true,
5831 + "default": "now()"
5832 + },
5833 + "last_used_at": {
5834 + "name": "last_used_at",
5835 + "type": "timestamp with time zone",
5836 + "primaryKey": false,
5837 + "notNull": false
5838 + },
5839 + "revoked_at": {
5840 + "name": "revoked_at",
5841 + "type": "timestamp with time zone",
5842 + "primaryKey": false,
5843 + "notNull": false
5844 + }
5845 + },
5846 + "indexes": {
5847 + "api_keys_user_idx": {
5848 + "name": "api_keys_user_idx",
5849 + "columns": [
5850 + {
5851 + "expression": "user_id",
5852 + "isExpression": false,
5853 + "asc": true,
5854 + "nulls": "last"
5855 + }
5856 + ],
5857 + "isUnique": false,
5858 + "concurrently": false,
5859 + "method": "btree",
5860 + "with": {}
5861 + }
5862 + },
5863 + "foreignKeys": {},
5864 + "compositePrimaryKeys": {},
5865 + "uniqueConstraints": {
5866 + "api_keys_key_hash_unique": {
5867 + "name": "api_keys_key_hash_unique",
5868 + "nullsNotDistinct": false,
5869 + "columns": [
5870 + "key_hash"
5871 + ]
5872 + }
5873 + },
5874 + "policies": {},
5875 + "checkConstraints": {},
5876 + "isRLSEnabled": false
5877 + },
5878 + "public.api_usage": {
5879 + "name": "api_usage",
5880 + "schema": "",
5881 + "columns": {
5882 + "key_id": {
5883 + "name": "key_id",
5884 + "type": "text",
5885 + "primaryKey": false,
5886 + "notNull": true
5887 + },
5888 + "date": {
5889 + "name": "date",
5890 + "type": "date",
5891 + "primaryKey": false,
5892 + "notNull": true
5893 + },
5894 + "endpoint": {
5895 + "name": "endpoint",
5896 + "type": "text",
5897 + "primaryKey": false,
5898 + "notNull": true
5899 + },
5900 + "count": {
5901 + "name": "count",
5902 + "type": "integer",
5903 + "primaryKey": false,
5904 + "notNull": true,
5905 + "default": 0
5906 + },
5907 + "latency_ms_avg": {
5908 + "name": "latency_ms_avg",
5909 + "type": "real",
5910 + "primaryKey": false,
5911 + "notNull": false
5912 + }
5913 + },
5914 + "indexes": {},
5915 + "foreignKeys": {},
5916 + "compositePrimaryKeys": {
5917 + "api_usage_key_id_date_endpoint_pk": {
5918 + "name": "api_usage_key_id_date_endpoint_pk",
5919 + "columns": [
5920 + "key_id",
5921 + "date",
5922 + "endpoint"
5923 + ]
5924 + }
5925 + },
5926 + "uniqueConstraints": {},
5927 + "policies": {},
5928 + "checkConstraints": {},
5929 + "isRLSEnabled": false
5930 + },
5931 + "public.asset_views": {
5932 + "name": "asset_views",
5933 + "schema": "",
5934 + "columns": {
5935 + "asset_id": {
5936 + "name": "asset_id",
5937 + "type": "text",
5938 + "primaryKey": false,
5939 + "notNull": true
5940 + },
5941 + "date": {
5942 + "name": "date",
5943 + "type": "date",
5944 + "primaryKey": false,
5945 + "notNull": true
5946 + },
5947 + "views": {
5948 + "name": "views",
5949 + "type": "integer",
5950 + "primaryKey": false,
5951 + "notNull": true,
5952 + "default": 0
5953 + }
5954 + },
5955 + "indexes": {},
5956 + "foreignKeys": {},
5957 + "compositePrimaryKeys": {
5958 + "asset_views_asset_id_date_pk": {
5959 + "name": "asset_views_asset_id_date_pk",
5960 + "columns": [
5961 + "asset_id",
5962 + "date"
5963 + ]
5964 + }
5965 + },
5966 + "uniqueConstraints": {},
5967 + "policies": {},
5968 + "checkConstraints": {},
5969 + "isRLSEnabled": false
5970 + },
5971 + "public.collection_items": {
5972 + "name": "collection_items",
5973 + "schema": "",
5974 + "columns": {
5975 + "id": {
5976 + "name": "id",
5977 + "type": "text",
5978 + "primaryKey": true,
5979 + "notNull": true
5980 + },
5981 + "collection_id": {
5982 + "name": "collection_id",
5983 + "type": "text",
5984 + "primaryKey": false,
5985 + "notNull": true
5986 + },
5987 + "asset_id": {
5988 + "name": "asset_id",
5989 + "type": "text",
5990 + "primaryKey": false,
5991 + "notNull": true
5992 + },
5993 + "variant_id": {
5994 + "name": "variant_id",
5995 + "type": "text",
5996 + "primaryKey": false,
5997 + "notNull": false
5998 + },
5999 + "quantity": {
6000 + "name": "quantity",
6001 + "type": "integer",
6002 + "primaryKey": false,
6003 + "notNull": true,
6004 + "default": 1
6005 + },
6006 + "acquired_at": {
6007 + "name": "acquired_at",
6008 + "type": "date",
6009 + "primaryKey": false,
6010 + "notNull": false
6011 + },
6012 + "purchase_price": {
6013 + "name": "purchase_price",
6014 + "type": "numeric(18, 4)",
6015 + "primaryKey": false,
6016 + "notNull": false
6017 + },
6018 + "purchase_currency": {
6019 + "name": "purchase_currency",
6020 + "type": "text",
6021 + "primaryKey": false,
6022 + "notNull": false
6023 + },
6024 + "purchase_price_usd": {
6025 + "name": "purchase_price_usd",
6026 + "type": "numeric(18, 4)",
6027 + "primaryKey": false,
6028 + "notNull": false
6029 + },
6030 + "source": {
6031 + "name": "source",
6032 + "type": "text",
6033 + "primaryKey": false,
6034 + "notNull": false
6035 + },
6036 + "grader": {
6037 + "name": "grader",
6038 + "type": "text",
6039 + "primaryKey": false,
6040 + "notNull": false
6041 + },
6042 + "grade": {
6043 + "name": "grade",
6044 + "type": "text",
6045 + "primaryKey": false,
6046 + "notNull": false
6047 + },
6048 + "certification_number": {
6049 + "name": "certification_number",
6050 + "type": "text",
6051 + "primaryKey": false,
6052 + "notNull": false
6053 + },
6054 + "serial": {
6055 + "name": "serial",
6056 + "type": "text",
6057 + "primaryKey": false,
6058 + "notNull": false
6059 + },
6060 + "photos": {
6061 + "name": "photos",
6062 + "type": "jsonb",
6063 + "primaryKey": false,
6064 + "notNull": true,
6065 + "default": "'[]'::jsonb"
6066 + },
6067 + "notes": {
6068 + "name": "notes",
6069 + "type": "text",
6070 + "primaryKey": false,
6071 + "notNull": false
6072 + },
6073 + "tags": {
6074 + "name": "tags",
6075 + "type": "jsonb",
6076 + "primaryKey": false,
6077 + "notNull": true,
6078 + "default": "'[]'::jsonb"
6079 + },
6080 + "condition": {
6081 + "name": "condition",
6082 + "type": "text",
6083 + "primaryKey": false,
6084 + "notNull": false
6085 + },
6086 + "manual_value_usd": {
6087 + "name": "manual_value_usd",
6088 + "type": "numeric(18, 4)",
6089 + "primaryKey": false,
6090 + "notNull": false
6091 + },
6092 + "sold_at": {
6093 + "name": "sold_at",
6094 + "type": "date",
6095 + "primaryKey": false,
6096 + "notNull": false
6097 + },
6098 + "sold_price_usd": {
6099 + "name": "sold_price_usd",
6100 + "type": "numeric(18, 4)",
6101 + "primaryKey": false,
6102 + "notNull": false
6103 + },
6104 + "created_at": {
6105 + "name": "created_at",
6106 + "type": "timestamp with time zone",
6107 + "primaryKey": false,
6108 + "notNull": true,
6109 + "default": "now()"
6110 + },
6111 + "updated_at": {
6112 + "name": "updated_at",
6113 + "type": "timestamp with time zone",
6114 + "primaryKey": false,
6115 + "notNull": true,
6116 + "default": "now()"
6117 + }
6118 + },
6119 + "indexes": {
6120 + "collection_items_collection_idx": {
6121 + "name": "collection_items_collection_idx",
6122 + "columns": [
6123 + {
6124 + "expression": "collection_id",
6125 + "isExpression": false,
6126 + "asc": true,
6127 + "nulls": "last"
6128 + }
6129 + ],
6130 + "isUnique": false,
6131 + "concurrently": false,
6132 + "method": "btree",
6133 + "with": {}
6134 + },
6135 + "collection_items_asset_idx": {
6136 + "name": "collection_items_asset_idx",
6137 + "columns": [
6138 + {
6139 + "expression": "asset_id",
6140 + "isExpression": false,
6141 + "asc": true,
6142 + "nulls": "last"
6143 + }
6144 + ],
6145 + "isUnique": false,
6146 + "concurrently": false,
6147 + "method": "btree",
6148 + "with": {}
6149 + }
6150 + },
6151 + "foreignKeys": {},
6152 + "compositePrimaryKeys": {},
6153 + "uniqueConstraints": {},
6154 + "policies": {},
6155 + "checkConstraints": {},
6156 + "isRLSEnabled": false
6157 + },
6158 + "public.collection_snapshots": {
6159 + "name": "collection_snapshots",
6160 + "schema": "",
6161 + "columns": {
6162 + "collection_id": {
6163 + "name": "collection_id",
6164 + "type": "text",
6165 + "primaryKey": false,
6166 + "notNull": true
6167 + },
6168 + "date": {
6169 + "name": "date",
6170 + "type": "date",
6171 + "primaryKey": false,
6172 + "notNull": true
6173 + },
6174 + "value_usd": {
6175 + "name": "value_usd",
6176 + "type": "numeric(18, 4)",
6177 + "primaryKey": false,
6178 + "notNull": true
6179 + },
6180 + "cost_basis_usd": {
6181 + "name": "cost_basis_usd",
6182 + "type": "numeric(18, 4)",
6183 + "primaryKey": false,
6184 + "notNull": true
6185 + },
6186 + "items": {
6187 + "name": "items",
6188 + "type": "integer",
6189 + "primaryKey": false,
6190 + "notNull": true
6191 + }
6192 + },
6193 + "indexes": {},
6194 + "foreignKeys": {},
6195 + "compositePrimaryKeys": {
6196 + "collection_snapshots_collection_id_date_pk": {
6197 + "name": "collection_snapshots_collection_id_date_pk",
6198 + "columns": [
6199 + "collection_id",
6200 + "date"
6201 + ]
6202 + }
6203 + },
6204 + "uniqueConstraints": {},
6205 + "policies": {},
6206 + "checkConstraints": {},
6207 + "isRLSEnabled": false
6208 + },
6209 + "public.collections": {
6210 + "name": "collections",
6211 + "schema": "",
6212 + "columns": {
6213 + "id": {
6214 + "name": "id",
6215 + "type": "text",
6216 + "primaryKey": true,
6217 + "notNull": true
6218 + },
6219 + "user_id": {
6220 + "name": "user_id",
6221 + "type": "text",
6222 + "primaryKey": false,
6223 + "notNull": true
6224 + },
6225 + "name": {
6226 + "name": "name",
6227 + "type": "text",
6228 + "primaryKey": false,
6229 + "notNull": true
6230 + },
6231 + "description": {
6232 + "name": "description",
6233 + "type": "text",
6234 + "primaryKey": false,
6235 + "notNull": false
6236 + },
6237 + "is_public": {
6238 + "name": "is_public",
6239 + "type": "boolean",
6240 + "primaryKey": false,
6241 + "notNull": true,
6242 + "default": false
6243 + },
6244 + "public_slug": {
6245 + "name": "public_slug",
6246 + "type": "text",
6247 + "primaryKey": false,
6248 + "notNull": false
6249 + },
6250 + "kind": {
6251 + "name": "kind",
6252 + "type": "text",
6253 + "primaryKey": false,
6254 + "notNull": true,
6255 + "default": "'collection'"
6256 + },
6257 + "budget_usd": {
6258 + "name": "budget_usd",
6259 + "type": "numeric(18, 4)",
6260 + "primaryKey": false,
6261 + "notNull": false
6262 + },
6263 + "color": {
6264 + "name": "color",
6265 + "type": "text",
6266 + "primaryKey": false,
6267 + "notNull": false
6268 + },
6269 + "created_at": {
6270 + "name": "created_at",
6271 + "type": "timestamp with time zone",
6272 + "primaryKey": false,
6273 + "notNull": true,
6274 + "default": "now()"
6275 + },
6276 + "updated_at": {
6277 + "name": "updated_at",
6278 + "type": "timestamp with time zone",
6279 + "primaryKey": false,
6280 + "notNull": true,
6281 + "default": "now()"
6282 + }
6283 + },
6284 + "indexes": {
6285 + "collections_user_idx": {
6286 + "name": "collections_user_idx",
6287 + "columns": [
6288 + {
6289 + "expression": "user_id",
6290 + "isExpression": false,
6291 + "asc": true,
6292 + "nulls": "last"
6293 + }
6294 + ],
6295 + "isUnique": false,
6296 + "concurrently": false,
6297 + "method": "btree",
6298 + "with": {}
6299 + },
6300 + "collections_public_slug_uq": {
6301 + "name": "collections_public_slug_uq",
6302 + "columns": [
6303 + {
6304 + "expression": "public_slug",
6305 + "isExpression": false,
6306 + "asc": true,
6307 + "nulls": "last"
6308 + }
6309 + ],
6310 + "isUnique": true,
6311 + "concurrently": false,
6312 + "method": "btree",
6313 + "with": {}
6314 + }
6315 + },
6316 + "foreignKeys": {},
6317 + "compositePrimaryKeys": {},
6318 + "uniqueConstraints": {},
6319 + "policies": {},
6320 + "checkConstraints": {},
6321 + "isRLSEnabled": false
6322 + },
6323 + "public.search_log": {
6324 + "name": "search_log",
6325 + "schema": "",
6326 + "columns": {
6327 + "id": {
6328 + "name": "id",
6329 + "type": "text",
6330 + "primaryKey": true,
6331 + "notNull": true
6332 + },
6333 + "query": {
6334 + "name": "query",
6335 + "type": "text",
6336 + "primaryKey": false,
6337 + "notNull": true
6338 + },
6339 + "normalized": {
6340 + "name": "normalized",
6341 + "type": "text",
6342 + "primaryKey": false,
6343 + "notNull": true
6344 + },
6345 + "results": {
6346 + "name": "results",
6347 + "type": "integer",
6348 + "primaryKey": false,
6349 + "notNull": true
6350 + },
6351 + "user_id": {
6352 + "name": "user_id",
6353 + "type": "text",
6354 + "primaryKey": false,
6355 + "notNull": false
6356 + },
6357 + "created_at": {
6358 + "name": "created_at",
6359 + "type": "timestamp with time zone",
6360 + "primaryKey": false,
6361 + "notNull": true,
6362 + "default": "now()"
6363 + }
6364 + },
6365 + "indexes": {
6366 + "search_log_created_idx": {
6367 + "name": "search_log_created_idx",
6368 + "columns": [
6369 + {
6370 + "expression": "created_at",
6371 + "isExpression": false,
6372 + "asc": true,
6373 + "nulls": "last"
6374 + }
6375 + ],
6376 + "isUnique": false,
6377 + "concurrently": false,
6378 + "method": "btree",
6379 + "with": {}
6380 + },
6381 + "search_log_normalized_idx": {
6382 + "name": "search_log_normalized_idx",
6383 + "columns": [
6384 + {
6385 + "expression": "normalized",
6386 + "isExpression": false,
6387 + "asc": true,
6388 + "nulls": "last"
6389 + }
6390 + ],
6391 + "isUnique": false,
6392 + "concurrently": false,
6393 + "method": "btree",
6394 + "with": {}
6395 + }
6396 + },
6397 + "foreignKeys": {},
6398 + "compositePrimaryKeys": {},
6399 + "uniqueConstraints": {},
6400 + "policies": {},
6401 + "checkConstraints": {},
6402 + "isRLSEnabled": false
6403 + },
6404 + "public.sessions": {
6405 + "name": "sessions",
6406 + "schema": "",
6407 + "columns": {
6408 + "id": {
6409 + "name": "id",
6410 + "type": "text",
6411 + "primaryKey": true,
6412 + "notNull": true
6413 + },
6414 + "user_id": {
6415 + "name": "user_id",
6416 + "type": "text",
6417 + "primaryKey": false,
6418 + "notNull": true
6419 + },
6420 + "expires_at": {
6421 + "name": "expires_at",
6422 + "type": "timestamp with time zone",
6423 + "primaryKey": false,
6424 + "notNull": true
6425 + },
6426 + "user_agent": {
6427 + "name": "user_agent",
6428 + "type": "text",
6429 + "primaryKey": false,
6430 + "notNull": false
6431 + },
6432 + "ip": {
6433 + "name": "ip",
6434 + "type": "text",
6435 + "primaryKey": false,
6436 + "notNull": false
6437 + },
6438 + "last_seen_at": {
6439 + "name": "last_seen_at",
6440 + "type": "timestamp with time zone",
6441 + "primaryKey": false,
6442 + "notNull": false
6443 + },
6444 + "revoked_at": {
6445 + "name": "revoked_at",
6446 + "type": "timestamp with time zone",
6447 + "primaryKey": false,
6448 + "notNull": false
6449 + },
6450 + "created_at": {
6451 + "name": "created_at",
6452 + "type": "timestamp with time zone",
6453 + "primaryKey": false,
6454 + "notNull": true,
6455 + "default": "now()"
6456 + }
6457 + },
6458 + "indexes": {
6459 + "sessions_user_idx": {
6460 + "name": "sessions_user_idx",
6461 + "columns": [
6462 + {
6463 + "expression": "user_id",
6464 + "isExpression": false,
6465 + "asc": true,
6466 + "nulls": "last"
6467 + }
6468 + ],
6469 + "isUnique": false,
6470 + "concurrently": false,
6471 + "method": "btree",
6472 + "with": {}
6473 + }
6474 + },
6475 + "foreignKeys": {},
6476 + "compositePrimaryKeys": {},
6477 + "uniqueConstraints": {},
6478 + "policies": {},
6479 + "checkConstraints": {},
6480 + "isRLSEnabled": false
6481 + },
6482 + "public.users": {
6483 + "name": "users",
6484 + "schema": "",
6485 + "columns": {
6486 + "id": {
6487 + "name": "id",
6488 + "type": "text",
6489 + "primaryKey": true,
6490 + "notNull": true
6491 + },
6492 + "email": {
6493 + "name": "email",
6494 + "type": "text",
6495 + "primaryKey": false,
6496 + "notNull": true
6497 + },
6498 + "email_verified_at": {
6499 + "name": "email_verified_at",
6500 + "type": "timestamp with time zone",
6501 + "primaryKey": false,
6502 + "notNull": false
6503 + },
6504 + "password_hash": {
6505 + "name": "password_hash",
6506 + "type": "text",
6507 + "primaryKey": false,
6508 + "notNull": false
6509 + },
6510 + "name": {
6511 + "name": "name",
6512 + "type": "text",
6513 + "primaryKey": false,
6514 + "notNull": false
6515 + },
6516 + "role": {
6517 + "name": "role",
6518 + "type": "text",
6519 + "primaryKey": false,
6520 + "notNull": true,
6521 + "default": "'user'"
6522 + },
6523 + "display_currency": {
6524 + "name": "display_currency",
6525 + "type": "text",
6526 + "primaryKey": false,
6527 + "notNull": true,
6528 + "default": "'USD'"
6529 + },
6530 + "providers": {
6531 + "name": "providers",
6532 + "type": "jsonb",
6533 + "primaryKey": false,
6534 + "notNull": true,
6535 + "default": "'[]'::jsonb"
6536 + },
6537 + "preferences": {
6538 + "name": "preferences",
6539 + "type": "jsonb",
6540 + "primaryKey": false,
6541 + "notNull": true,
6542 + "default": "'{}'::jsonb"
6543 + },
6544 + "handle": {
6545 + "name": "handle",
6546 + "type": "text",
6547 + "primaryKey": false,
6548 + "notNull": false
6549 + },
6550 + "avatar_url": {
6551 + "name": "avatar_url",
6552 + "type": "text",
6553 + "primaryKey": false,
6554 + "notNull": false
6555 + },
6556 + "bio": {
6557 + "name": "bio",
6558 + "type": "text",
6559 + "primaryKey": false,
6560 + "notNull": false
6561 + },
6562 + "mfa_enabled": {
6563 + "name": "mfa_enabled",
6564 + "type": "boolean",
6565 + "primaryKey": false,
6566 + "notNull": true,
6567 + "default": false
6568 + },
6569 + "totp_secret_enc": {
6570 + "name": "totp_secret_enc",
6571 + "type": "text",
6572 + "primaryKey": false,
6573 + "notNull": false
6574 + },
6575 + "always_ask_code": {
6576 + "name": "always_ask_code",
6577 + "type": "boolean",
6578 + "primaryKey": false,
6579 + "notNull": true,
6580 + "default": true
6581 + },
6582 + "password_changed_at": {
6583 + "name": "password_changed_at",
6584 + "type": "timestamp with time zone",
6585 + "primaryKey": false,
6586 + "notNull": false
6587 + },
6588 + "pending_email": {
6589 + "name": "pending_email",
6590 + "type": "text",
6591 + "primaryKey": false,
6592 + "notNull": false
6593 + },
6594 + "deleted_at": {
6595 + "name": "deleted_at",
6596 + "type": "timestamp with time zone",
6597 + "primaryKey": false,
6598 + "notNull": false
6599 + },
6600 + "purge_after": {
6601 + "name": "purge_after",
6602 + "type": "timestamp with time zone",
6603 + "primaryKey": false,
6604 + "notNull": false
6605 + },
6606 + "created_at": {
6607 + "name": "created_at",
6608 + "type": "timestamp with time zone",
6609 + "primaryKey": false,
6610 + "notNull": true,
6611 + "default": "now()"
6612 + },
6613 + "last_login_at": {
6614 + "name": "last_login_at",
6615 + "type": "timestamp with time zone",
6616 + "primaryKey": false,
6617 + "notNull": false
6618 + }
6619 + },
6620 + "indexes": {},
6621 + "foreignKeys": {},
6622 + "compositePrimaryKeys": {},
6623 + "uniqueConstraints": {
6624 + "users_email_unique": {
6625 + "name": "users_email_unique",
6626 + "nullsNotDistinct": false,
6627 + "columns": [
6628 + "email"
6629 + ]
6630 + },
6631 + "users_handle_unique": {
6632 + "name": "users_handle_unique",
6633 + "nullsNotDistinct": false,
6634 + "columns": [
6635 + "handle"
6636 + ]
6637 + }
6638 + },
6639 + "policies": {},
6640 + "checkConstraints": {},
6641 + "isRLSEnabled": false
6642 + },
6643 + "public.watchlist_items": {
6644 + "name": "watchlist_items",
6645 + "schema": "",
6646 + "columns": {
6647 + "id": {
6648 + "name": "id",
6649 + "type": "text",
6650 + "primaryKey": true,
6651 + "notNull": true
6652 + },
6653 + "watchlist_id": {
6654 + "name": "watchlist_id",
6655 + "type": "text",
6656 + "primaryKey": false,
6657 + "notNull": true
6658 + },
6659 + "target_type": {
6660 + "name": "target_type",
6661 + "type": "text",
6662 + "primaryKey": false,
6663 + "notNull": true
6664 + },
6665 + "target_id": {
6666 + "name": "target_id",
6667 + "type": "text",
6668 + "primaryKey": false,
6669 + "notNull": true
6670 + },
6671 + "label": {
6672 + "name": "label",
6673 + "type": "text",
6674 + "primaryKey": false,
6675 + "notNull": false
6676 + },
6677 + "note": {
6678 + "name": "note",
6679 + "type": "text",
6680 + "primaryKey": false,
6681 + "notNull": false
6682 + },
6683 + "target_price_usd": {
6684 + "name": "target_price_usd",
6685 + "type": "numeric(18, 4)",
6686 + "primaryKey": false,
6687 + "notNull": false
6688 + },
6689 + "baseline_usd": {
6690 + "name": "baseline_usd",
6691 + "type": "numeric(18, 4)",
6692 + "primaryKey": false,
6693 + "notNull": false
6694 + },
6695 + "created_at": {
6696 + "name": "created_at",
6697 + "type": "timestamp with time zone",
6698 + "primaryKey": false,
6699 + "notNull": true,
6700 + "default": "now()"
6701 + }
6702 + },
6703 + "indexes": {
6704 + "watchlist_items_uq": {
6705 + "name": "watchlist_items_uq",
6706 + "columns": [
6707 + {
6708 + "expression": "watchlist_id",
6709 + "isExpression": false,
6710 + "asc": true,
6711 + "nulls": "last"
6712 + },
6713 + {
6714 + "expression": "target_type",
6715 + "isExpression": false,
6716 + "asc": true,
6717 + "nulls": "last"
6718 + },
6719 + {
6720 + "expression": "target_id",
6721 + "isExpression": false,
6722 + "asc": true,
6723 + "nulls": "last"
6724 + }
6725 + ],
6726 + "isUnique": true,
6727 + "concurrently": false,
6728 + "method": "btree",
6729 + "with": {}
6730 + }
6731 + },
6732 + "foreignKeys": {},
6733 + "compositePrimaryKeys": {},
6734 + "uniqueConstraints": {},
6735 + "policies": {},
6736 + "checkConstraints": {},
6737 + "isRLSEnabled": false
6738 + },
6739 + "public.watchlists": {
6740 + "name": "watchlists",
6741 + "schema": "",
6742 + "columns": {
6743 + "id": {
6744 + "name": "id",
6745 + "type": "text",
6746 + "primaryKey": true,
6747 + "notNull": true
6748 + },
6749 + "user_id": {
6750 + "name": "user_id",
6751 + "type": "text",
6752 + "primaryKey": false,
6753 + "notNull": true
6754 + },
6755 + "name": {
6756 + "name": "name",
6757 + "type": "text",
6758 + "primaryKey": false,
6759 + "notNull": true,
6760 + "default": "'Watchlist'"
6761 + },
6762 + "created_at": {
6763 + "name": "created_at",
6764 + "type": "timestamp with time zone",
6765 + "primaryKey": false,
6766 + "notNull": true,
6767 + "default": "now()"
6768 + }
6769 + },
6770 + "indexes": {
6771 + "watchlists_user_idx": {
6772 + "name": "watchlists_user_idx",
6773 + "columns": [
6774 + {
6775 + "expression": "user_id",
6776 + "isExpression": false,
6777 + "asc": true,
6778 + "nulls": "last"
6779 + }
6780 + ],
6781 + "isUnique": false,
6782 + "concurrently": false,
6783 + "method": "btree",
6784 + "with": {}
6785 + }
6786 + },
6787 + "foreignKeys": {},
6788 + "compositePrimaryKeys": {},
6789 + "uniqueConstraints": {},
6790 + "policies": {},
6791 + "checkConstraints": {},
6792 + "isRLSEnabled": false
6793 + },
6794 + "public.ai_quotas": {
6795 + "name": "ai_quotas",
6796 + "schema": "",
6797 + "columns": {
6798 + "key": {
6799 + "name": "key",
6800 + "type": "text",
6801 + "primaryKey": false,
6802 + "notNull": true
6803 + },
6804 + "feature": {
6805 + "name": "feature",
6806 + "type": "text",
6807 + "primaryKey": false,
6808 + "notNull": true
6809 + },
6810 + "date": {
6811 + "name": "date",
6812 + "type": "text",
6813 + "primaryKey": false,
6814 + "notNull": true
6815 + },
6816 + "count": {
6817 + "name": "count",
6818 + "type": "integer",
6819 + "primaryKey": false,
6820 + "notNull": true,
6821 + "default": 0
6822 + }
6823 + },
6824 + "indexes": {
6825 + "ai_quotas_uq": {
6826 + "name": "ai_quotas_uq",
6827 + "columns": [
6828 + {
6829 + "expression": "key",
6830 + "isExpression": false,
6831 + "asc": true,
6832 + "nulls": "last"
6833 + },
6834 + {
6835 + "expression": "feature",
6836 + "isExpression": false,
6837 + "asc": true,
6838 + "nulls": "last"
6839 + },
6840 + {
6841 + "expression": "date",
6842 + "isExpression": false,
6843 + "asc": true,
6844 + "nulls": "last"
6845 + }
6846 + ],
6847 + "isUnique": false,
6848 + "concurrently": false,
6849 + "method": "btree",
6850 + "with": {}
6851 + }
6852 + },
6853 + "foreignKeys": {},
6854 + "compositePrimaryKeys": {},
6855 + "uniqueConstraints": {},
6856 + "policies": {},
6857 + "checkConstraints": {},
6858 + "isRLSEnabled": false
6859 + },
6860 + "public.research_messages": {
6861 + "name": "research_messages",
6862 + "schema": "",
6863 + "columns": {
6864 + "id": {
6865 + "name": "id",
6866 + "type": "text",
6867 + "primaryKey": true,
6868 + "notNull": true
6869 + },
6870 + "session_id": {
6871 + "name": "session_id",
6872 + "type": "text",
6873 + "primaryKey": false,
6874 + "notNull": true
6875 + },
6876 + "role": {
6877 + "name": "role",
6878 + "type": "text",
6879 + "primaryKey": false,
6880 + "notNull": true
6881 + },
6882 + "content": {
6883 + "name": "content",
6884 + "type": "text",
6885 + "primaryKey": false,
6886 + "notNull": true
6887 + },
6888 + "tool_calls": {
6889 + "name": "tool_calls",
6890 + "type": "jsonb",
6891 + "primaryKey": false,
6892 + "notNull": true,
6893 + "default": "'[]'::jsonb"
6894 + },
6895 + "usage": {
6896 + "name": "usage",
6897 + "type": "jsonb",
6898 + "primaryKey": false,
6899 + "notNull": true,
6900 + "default": "'{}'::jsonb"
6901 + },
6902 + "usd_est": {
6903 + "name": "usd_est",
6904 + "type": "real",
6905 + "primaryKey": false,
6906 + "notNull": true,
6907 + "default": 0
6908 + },
6909 + "model": {
6910 + "name": "model",
6911 + "type": "text",
6912 + "primaryKey": false,
6913 + "notNull": false
6914 + },
6915 + "created_at": {
6916 + "name": "created_at",
6917 + "type": "timestamp with time zone",
6918 + "primaryKey": false,
6919 + "notNull": true,
6920 + "default": "now()"
6921 + }
6922 + },
6923 + "indexes": {
6924 + "research_messages_session_idx": {
6925 + "name": "research_messages_session_idx",
6926 + "columns": [
6927 + {
6928 + "expression": "session_id",
6929 + "isExpression": false,
6930 + "asc": true,
6931 + "nulls": "last"
6932 + },
6933 + {
6934 + "expression": "created_at",
6935 + "isExpression": false,
6936 + "asc": true,
6937 + "nulls": "last"
6938 + }
6939 + ],
6940 + "isUnique": false,
6941 + "concurrently": false,
6942 + "method": "btree",
6943 + "with": {}
6944 + }
6945 + },
6946 + "foreignKeys": {},
6947 + "compositePrimaryKeys": {},
6948 + "uniqueConstraints": {},
6949 + "policies": {},
6950 + "checkConstraints": {},
6951 + "isRLSEnabled": false
6952 + },
6953 + "public.research_sessions": {
6954 + "name": "research_sessions",
6955 + "schema": "",
6956 + "columns": {
6957 + "id": {
6958 + "name": "id",
6959 + "type": "text",
6960 + "primaryKey": true,
6961 + "notNull": true
6962 + },
6963 + "user_id": {
6964 + "name": "user_id",
6965 + "type": "text",
6966 + "primaryKey": false,
6967 + "notNull": false
6968 + },
6969 + "anon_id": {
6970 + "name": "anon_id",
6971 + "type": "text",
6972 + "primaryKey": false,
6973 + "notNull": false
6974 + },
6975 + "title": {
6976 + "name": "title",
6977 + "type": "text",
6978 + "primaryKey": false,
6979 + "notNull": false
6980 + },
6981 + "model": {
6982 + "name": "model",
6983 + "type": "text",
6984 + "primaryKey": false,
6985 + "notNull": false
6986 + },
6987 + "message_count": {
6988 + "name": "message_count",
6989 + "type": "integer",
6990 + "primaryKey": false,
6991 + "notNull": true,
6992 + "default": 0
6993 + },
6994 + "usd_est": {
6995 + "name": "usd_est",
6996 + "type": "real",
6997 + "primaryKey": false,
6998 + "notNull": true,
6999 + "default": 0
7000 + },
7001 + "archived": {
7002 + "name": "archived",
7003 + "type": "boolean",
7004 + "primaryKey": false,
7005 + "notNull": true,
7006 + "default": false
7007 + },
7008 + "created_at": {
7009 + "name": "created_at",
7010 + "type": "timestamp with time zone",
7011 + "primaryKey": false,
7012 + "notNull": true,
7013 + "default": "now()"
7014 + },
7015 + "updated_at": {
7016 + "name": "updated_at",
7017 + "type": "timestamp with time zone",
7018 + "primaryKey": false,
7019 + "notNull": true,
7020 + "default": "now()"
7021 + }
7022 + },
7023 + "indexes": {
7024 + "research_sessions_anon_idx": {
7025 + "name": "research_sessions_anon_idx",
7026 + "columns": [
7027 + {
7028 + "expression": "anon_id",
7029 + "isExpression": false,
7030 + "asc": true,
7031 + "nulls": "last"
7032 + },
7033 + {
7034 + "expression": "updated_at",
7035 + "isExpression": false,
7036 + "asc": true,
7037 + "nulls": "last"
7038 + }
7039 + ],
7040 + "isUnique": false,
7041 + "concurrently": false,
7042 + "method": "btree",
7043 + "with": {}
7044 + },
7045 + "research_sessions_user_idx": {
7046 + "name": "research_sessions_user_idx",
7047 + "columns": [
7048 + {
7049 + "expression": "user_id",
7050 + "isExpression": false,
7051 + "asc": true,
7052 + "nulls": "last"
7053 + },
7054 + {
7055 + "expression": "updated_at",
7056 + "isExpression": false,
7057 + "asc": true,
7058 + "nulls": "last"
7059 + }
7060 + ],
7061 + "isUnique": false,
7062 + "concurrently": false,
7063 + "method": "btree",
7064 + "with": {}
7065 + }
7066 + },
7067 + "foreignKeys": {},
7068 + "compositePrimaryKeys": {},
7069 + "uniqueConstraints": {},
7070 + "policies": {},
7071 + "checkConstraints": {},
7072 + "isRLSEnabled": false
7073 + },
7074 + "public.scanner_sessions": {
7075 + "name": "scanner_sessions",
7076 + "schema": "",
7077 + "columns": {
7078 + "id": {
7079 + "name": "id",
7080 + "type": "text",
7081 + "primaryKey": true,
7082 + "notNull": true
7083 + },
7084 + "user_id": {
7085 + "name": "user_id",
7086 + "type": "text",
7087 + "primaryKey": false,
7088 + "notNull": false
7089 + },
7090 + "anon_id": {
7091 + "name": "anon_id",
7092 + "type": "text",
7093 + "primaryKey": false,
7094 + "notNull": false
7095 + },
7096 + "ip_hash": {
7097 + "name": "ip_hash",
7098 + "type": "text",
7099 + "primaryKey": false,
7100 + "notNull": false
7101 + },
7102 + "mode": {
7103 + "name": "mode",
7104 + "type": "text",
7105 + "primaryKey": false,
7106 + "notNull": true
7107 + },
7108 + "input_url": {
7109 + "name": "input_url",
7110 + "type": "text",
7111 + "primaryKey": false,
7112 + "notNull": false
7113 + },
7114 + "input_text": {
7115 + "name": "input_text",
7116 + "type": "text",
7117 + "primaryKey": false,
7118 + "notNull": false
7119 + },
7120 + "image_count": {
7121 + "name": "image_count",
7122 + "type": "integer",
7123 + "primaryKey": false,
7124 + "notNull": true,
7125 + "default": 0
7126 + },
7127 + "thumbnails": {
7128 + "name": "thumbnails",
7129 + "type": "jsonb",
7130 + "primaryKey": false,
7131 + "notNull": true,
7132 + "default": "'[]'::jsonb"
7133 + },
7134 + "guess": {
7135 + "name": "guess",
7136 + "type": "jsonb",
7137 + "primaryKey": false,
7138 + "notNull": true,
7139 + "default": "'{}'::jsonb"
7140 + },
7141 + "guess_confidence": {
7142 + "name": "guess_confidence",
7143 + "type": "real",
7144 + "primaryKey": false,
7145 + "notNull": false
7146 + },
7147 + "candidates": {
7148 + "name": "candidates",
7149 + "type": "jsonb",
7150 + "primaryKey": false,
7151 + "notNull": true,
7152 + "default": "'[]'::jsonb"
7153 + },
7154 + "chosen_asset_id": {
7155 + "name": "chosen_asset_id",
7156 + "type": "text",
7157 + "primaryKey": false,
7158 + "notNull": false
7159 + },
7160 + "listing": {
7161 + "name": "listing",
7162 + "type": "jsonb",
7163 + "primaryKey": false,
7164 + "notNull": true,
7165 + "default": "'{}'::jsonb"
7166 + },
7167 + "model": {
7168 + "name": "model",
7169 + "type": "text",
7170 + "primaryKey": false,
7171 + "notNull": false
7172 + },
7173 + "usd_est": {
7174 + "name": "usd_est",
7175 + "type": "real",
7176 + "primaryKey": false,
7177 + "notNull": true,
7178 + "default": 0
7179 + },
7180 + "duration_ms": {
7181 + "name": "duration_ms",
7182 + "type": "integer",
7183 + "primaryKey": false,
7184 + "notNull": false
7185 + },
7186 + "error": {
7187 + "name": "error",
7188 + "type": "text",
7189 + "primaryKey": false,
7190 + "notNull": false
7191 + },
7192 + "created_at": {
7193 + "name": "created_at",
7194 + "type": "timestamp with time zone",
7195 + "primaryKey": false,
7196 + "notNull": true,
7197 + "default": "now()"
7198 + },
7199 + "chosen_at": {
7200 + "name": "chosen_at",
7201 + "type": "timestamp with time zone",
7202 + "primaryKey": false,
7203 + "notNull": false
7204 + }
7205 + },
7206 + "indexes": {
7207 + "scanner_sessions_created_idx": {
7208 + "name": "scanner_sessions_created_idx",
7209 + "columns": [
7210 + {
7211 + "expression": "created_at",
7212 + "isExpression": false,
7213 + "asc": true,
7214 + "nulls": "last"
7215 + }
7216 + ],
7217 + "isUnique": false,
7218 + "concurrently": false,
7219 + "method": "btree",
7220 + "with": {}
7221 + },
7222 + "scanner_sessions_ip_idx": {
7223 + "name": "scanner_sessions_ip_idx",
7224 + "columns": [
7225 + {
7226 + "expression": "ip_hash",
7227 + "isExpression": false,
7228 + "asc": true,
7229 + "nulls": "last"
7230 + },
7231 + {
7232 + "expression": "created_at",
7233 + "isExpression": false,
7234 + "asc": true,
7235 + "nulls": "last"
7236 + }
7237 + ],
7238 + "isUnique": false,
7239 + "concurrently": false,
7240 + "method": "btree",
7241 + "with": {}
7242 + },
7243 + "scanner_sessions_user_idx": {
7244 + "name": "scanner_sessions_user_idx",
7245 + "columns": [
7246 + {
7247 + "expression": "user_id",
7248 + "isExpression": false,
7249 + "asc": true,
7250 + "nulls": "last"
7251 + }
7252 + ],
7253 + "isUnique": false,
7254 + "concurrently": false,
7255 + "method": "btree",
7256 + "with": {}
7257 + }
7258 + },
7259 + "foreignKeys": {},
7260 + "compositePrimaryKeys": {},
7261 + "uniqueConstraints": {},
7262 + "policies": {},
7263 + "checkConstraints": {},
7264 + "isRLSEnabled": false
7265 + },
7266 + "public.auth_codes": {
7267 + "name": "auth_codes",
7268 + "schema": "",
7269 + "columns": {
7270 + "id": {
7271 + "name": "id",
7272 + "type": "text",
7273 + "primaryKey": true,
7274 + "notNull": true
7275 + },
7276 + "user_id": {
7277 + "name": "user_id",
7278 + "type": "text",
7279 + "primaryKey": false,
7280 + "notNull": false
7281 + },
7282 + "email": {
7283 + "name": "email",
7284 + "type": "text",
7285 + "primaryKey": false,
7286 + "notNull": true
7287 + },
7288 + "purpose": {
7289 + "name": "purpose",
7290 + "type": "text",
7291 + "primaryKey": false,
7292 + "notNull": true
7293 + },
7294 + "code_hash": {
7295 + "name": "code_hash",
7296 + "type": "text",
7297 + "primaryKey": false,
7298 + "notNull": true
7299 + },
7300 + "expires_at": {
7301 + "name": "expires_at",
7302 + "type": "timestamp with time zone",
7303 + "primaryKey": false,
7304 + "notNull": true
7305 + },
7306 + "attempts": {
7307 + "name": "attempts",
7308 + "type": "integer",
7309 + "primaryKey": false,
7310 + "notNull": true,
7311 + "default": 0
7312 + },
7313 + "consumed_at": {
7314 + "name": "consumed_at",
7315 + "type": "timestamp with time zone",
7316 + "primaryKey": false,
7317 + "notNull": false
7318 + },
7319 + "payload": {
7320 + "name": "payload",
7321 + "type": "jsonb",
7322 + "primaryKey": false,
7323 + "notNull": true,
7324 + "default": "'{}'::jsonb"
7325 + },
7326 + "created_at": {
7327 + "name": "created_at",
7328 + "type": "timestamp with time zone",
7329 + "primaryKey": false,
7330 + "notNull": true,
7331 + "default": "now()"
7332 + }
7333 + },
7334 + "indexes": {
7335 + "auth_codes_lookup_idx": {
7336 + "name": "auth_codes_lookup_idx",
7337 + "columns": [
7338 + {
7339 + "expression": "email",
7340 + "isExpression": false,
7341 + "asc": true,
7342 + "nulls": "last"
7343 + },
7344 + {
7345 + "expression": "purpose",
7346 + "isExpression": false,
7347 + "asc": true,
7348 + "nulls": "last"
7349 + },
7350 + {
7351 + "expression": "created_at",
7352 + "isExpression": false,
7353 + "asc": true,
7354 + "nulls": "last"
7355 + }
7356 + ],
7357 + "isUnique": false,
7358 + "concurrently": false,
7359 + "method": "btree",
7360 + "with": {}
7361 + }
7362 + },
7363 + "foreignKeys": {},
7364 + "compositePrimaryKeys": {},
7365 + "uniqueConstraints": {},
7366 + "policies": {},
7367 + "checkConstraints": {},
7368 + "isRLSEnabled": false
7369 + },
7370 + "public.login_events": {
7371 + "name": "login_events",
7372 + "schema": "",
7373 + "columns": {
7374 + "id": {
7375 + "name": "id",
7376 + "type": "text",
7377 + "primaryKey": true,
7378 + "notNull": true
7379 + },
7380 + "user_id": {
7381 + "name": "user_id",
7382 + "type": "text",
7383 + "primaryKey": false,
7384 + "notNull": false
7385 + },
7386 + "email": {
7387 + "name": "email",
7388 + "type": "text",
7389 + "primaryKey": false,
7390 + "notNull": false
7391 + },
7392 + "ip": {
7393 + "name": "ip",
7394 + "type": "text",
7395 + "primaryKey": false,
7396 + "notNull": false
7397 + },
7398 + "user_agent": {
7399 + "name": "user_agent",
7400 + "type": "text",
7401 + "primaryKey": false,
7402 + "notNull": false
7403 + },
7404 + "outcome": {
7405 + "name": "outcome",
7406 + "type": "text",
7407 + "primaryKey": false,
7408 + "notNull": true
7409 + },
7410 + "method": {
7411 + "name": "method",
7412 + "type": "text",
7413 + "primaryKey": false,
7414 + "notNull": false
7415 + },
7416 + "created_at": {
7417 + "name": "created_at",
7418 + "type": "timestamp with time zone",
7419 + "primaryKey": false,
7420 + "notNull": true,
7421 + "default": "now()"
7422 + }
7423 + },
7424 + "indexes": {
7425 + "login_events_user_idx": {
7426 + "name": "login_events_user_idx",
7427 + "columns": [
7428 + {
7429 + "expression": "user_id",
7430 + "isExpression": false,
7431 + "asc": true,
7432 + "nulls": "last"
7433 + },
7434 + {
7435 + "expression": "created_at",
7436 + "isExpression": false,
7437 + "asc": true,
7438 + "nulls": "last"
7439 + }
7440 + ],
7441 + "isUnique": false,
7442 + "concurrently": false,
7443 + "method": "btree",
7444 + "with": {}
7445 + }
7446 + },
7447 + "foreignKeys": {},
7448 + "compositePrimaryKeys": {},
7449 + "uniqueConstraints": {},
7450 + "policies": {},
7451 + "checkConstraints": {},
7452 + "isRLSEnabled": false
7453 + },
7454 + "public.notifications": {
7455 + "name": "notifications",
7456 + "schema": "",
7457 + "columns": {
7458 + "id": {
7459 + "name": "id",
7460 + "type": "text",
7461 + "primaryKey": true,
7462 + "notNull": true
7463 + },
7464 + "user_id": {
7465 + "name": "user_id",
7466 + "type": "text",
7467 + "primaryKey": false,
7468 + "notNull": true
7469 + },
7470 + "kind": {
7471 + "name": "kind",
7472 + "type": "text",
7473 + "primaryKey": false,
7474 + "notNull": true
7475 + },
7476 + "title": {
7477 + "name": "title",
7478 + "type": "text",
7479 + "primaryKey": false,
7480 + "notNull": true
7481 + },
7482 + "body": {
7483 + "name": "body",
7484 + "type": "text",
7485 + "primaryKey": false,
7486 + "notNull": false
7487 + },
7488 + "href": {
7489 + "name": "href",
7490 + "type": "text",
7491 + "primaryKey": false,
7492 + "notNull": false
7493 + },
7494 + "payload": {
7495 + "name": "payload",
7496 + "type": "jsonb",
7497 + "primaryKey": false,
7498 + "notNull": true,
7499 + "default": "'{}'::jsonb"
7500 + },
7501 + "read_at": {
7502 + "name": "read_at",
7503 + "type": "timestamp with time zone",
7504 + "primaryKey": false,
7505 + "notNull": false
7506 + },
7507 + "emailed_at": {
7508 + "name": "emailed_at",
7509 + "type": "timestamp with time zone",
7510 + "primaryKey": false,
7511 + "notNull": false
7512 + },
7513 + "created_at": {
7514 + "name": "created_at",
7515 + "type": "timestamp with time zone",
7516 + "primaryKey": false,
7517 + "notNull": true,
7518 + "default": "now()"
7519 + }
7520 + },
7521 + "indexes": {
7522 + "notifications_user_idx": {
7523 + "name": "notifications_user_idx",
7524 + "columns": [
7525 + {
7526 + "expression": "user_id",
7527 + "isExpression": false,
7528 + "asc": true,
7529 + "nulls": "last"
7530 + },
7531 + {
7532 + "expression": "created_at",
7533 + "isExpression": false,
7534 + "asc": true,
7535 + "nulls": "last"
7536 + }
7537 + ],
7538 + "isUnique": false,
7539 + "concurrently": false,
7540 + "method": "btree",
7541 + "with": {}
7542 + },
7543 + "notifications_unread_idx": {
7544 + "name": "notifications_unread_idx",
7545 + "columns": [
7546 + {
7547 + "expression": "user_id",
7548 + "isExpression": false,
7549 + "asc": true,
7550 + "nulls": "last"
7551 + },
7552 + {
7553 + "expression": "read_at",
7554 + "isExpression": false,
7555 + "asc": true,
7556 + "nulls": "last"
7557 + }
7558 + ],
7559 + "isUnique": false,
7560 + "concurrently": false,
7561 + "method": "btree",
7562 + "with": {}
7563 + }
7564 + },
7565 + "foreignKeys": {},
7566 + "compositePrimaryKeys": {},
7567 + "uniqueConstraints": {},
7568 + "policies": {},
7569 + "checkConstraints": {},
7570 + "isRLSEnabled": false
7571 + },
7572 + "public.price_targets": {
7573 + "name": "price_targets",
7574 + "schema": "",
7575 + "columns": {
7576 + "id": {
7577 + "name": "id",
7578 + "type": "text",
7579 + "primaryKey": true,
7580 + "notNull": true
7581 + },
7582 + "user_id": {
7583 + "name": "user_id",
7584 + "type": "text",
7585 + "primaryKey": false,
7586 + "notNull": true
7587 + },
7588 + "asset_id": {
7589 + "name": "asset_id",
7590 + "type": "text",
7591 + "primaryKey": false,
7592 + "notNull": true
7593 + },
7594 + "variant_id": {
7595 + "name": "variant_id",
7596 + "type": "text",
7597 + "primaryKey": false,
7598 + "notNull": false
7599 + },
7600 + "direction": {
7601 + "name": "direction",
7602 + "type": "text",
7603 + "primaryKey": false,
7604 + "notNull": true,
7605 + "default": "'above'"
7606 + },
7607 + "target_usd": {
7608 + "name": "target_usd",
7609 + "type": "numeric(18, 4)",
7610 + "primaryKey": false,
7611 + "notNull": true
7612 + },
7613 + "baseline_usd": {
7614 + "name": "baseline_usd",
7615 + "type": "numeric(18, 4)",
7616 + "primaryKey": false,
7617 + "notNull": false
7618 + },
7619 + "note": {
7620 + "name": "note",
7621 + "type": "text",
7622 + "primaryKey": false,
7623 + "notNull": false
7624 + },
7625 + "hit_at": {
7626 + "name": "hit_at",
7627 + "type": "timestamp with time zone",
7628 + "primaryKey": false,
7629 + "notNull": false
7630 + },
7631 + "notified_at": {
7632 + "name": "notified_at",
7633 + "type": "timestamp with time zone",
7634 + "primaryKey": false,
7635 + "notNull": false
7636 + },
7637 + "created_at": {
7638 + "name": "created_at",
7639 + "type": "timestamp with time zone",
7640 + "primaryKey": false,
7641 + "notNull": true,
7642 + "default": "now()"
7643 + }
7644 + },
7645 + "indexes": {
7646 + "price_targets_user_idx": {
7647 + "name": "price_targets_user_idx",
7648 + "columns": [
7649 + {
7650 + "expression": "user_id",
7651 + "isExpression": false,
7652 + "asc": true,
7653 + "nulls": "last"
7654 + }
7655 + ],
7656 + "isUnique": false,
7657 + "concurrently": false,
7658 + "method": "btree",
7659 + "with": {}
7660 + },
7661 + "price_targets_asset_idx": {
7662 + "name": "price_targets_asset_idx",
7663 + "columns": [
7664 + {
7665 + "expression": "asset_id",
7666 + "isExpression": false,
7667 + "asc": true,
7668 + "nulls": "last"
7669 + },
7670 + {
7671 + "expression": "hit_at",
7672 + "isExpression": false,
7673 + "asc": true,
7674 + "nulls": "last"
7675 + }
7676 + ],
7677 + "isUnique": false,
7678 + "concurrently": false,
7679 + "method": "btree",
7680 + "with": {}
7681 + }
7682 + },
7683 + "foreignKeys": {},
7684 + "compositePrimaryKeys": {},
7685 + "uniqueConstraints": {},
7686 + "policies": {},
7687 + "checkConstraints": {},
7688 + "isRLSEnabled": false
7689 + },
7690 + "public.rate_limits": {
7691 + "name": "rate_limits",
7692 + "schema": "",
7693 + "columns": {
7694 + "key": {
7695 + "name": "key",
7696 + "type": "text",
7697 + "primaryKey": true,
7698 + "notNull": true
7699 + },
7700 + "count": {
7701 + "name": "count",
7702 + "type": "integer",
7703 + "primaryKey": false,
7704 + "notNull": true,
7705 + "default": 0
7706 + },
7707 + "reset_at": {
7708 + "name": "reset_at",
7709 + "type": "timestamp with time zone",
7710 + "primaryKey": false,
7711 + "notNull": true
7712 + }
7713 + },
7714 + "indexes": {},
7715 + "foreignKeys": {},
7716 + "compositePrimaryKeys": {},
7717 + "uniqueConstraints": {},
7718 + "policies": {},
7719 + "checkConstraints": {},
7720 + "isRLSEnabled": false
7721 + },
7722 + "public.recovery_codes": {
7723 + "name": "recovery_codes",
7724 + "schema": "",
7725 + "columns": {
7726 + "id": {
7727 + "name": "id",
7728 + "type": "text",
7729 + "primaryKey": true,
7730 + "notNull": true
7731 + },
7732 + "user_id": {
7733 + "name": "user_id",
7734 + "type": "text",
7735 + "primaryKey": false,
7736 + "notNull": true
7737 + },
7738 + "code_hash": {
7739 + "name": "code_hash",
7740 + "type": "text",
7741 + "primaryKey": false,
7742 + "notNull": true
7743 + },
7744 + "used_at": {
7745 + "name": "used_at",
7746 + "type": "timestamp with time zone",
7747 + "primaryKey": false,
7748 + "notNull": false
7749 + },
7750 + "created_at": {
7751 + "name": "created_at",
7752 + "type": "timestamp with time zone",
7753 + "primaryKey": false,
7754 + "notNull": true,
7755 + "default": "now()"
7756 + }
7757 + },
7758 + "indexes": {
7759 + "recovery_codes_user_idx": {
7760 + "name": "recovery_codes_user_idx",
7761 + "columns": [
7762 + {
7763 + "expression": "user_id",
7764 + "isExpression": false,
7765 + "asc": true,
7766 + "nulls": "last"
7767 + }
7768 + ],
7769 + "isUnique": false,
7770 + "concurrently": false,
7771 + "method": "btree",
7772 + "with": {}
7773 + }
7774 + },
7775 + "foreignKeys": {},
7776 + "compositePrimaryKeys": {},
7777 + "uniqueConstraints": {},
7778 + "policies": {},
7779 + "checkConstraints": {},
7780 + "isRLSEnabled": false
7781 + },
7782 + "public.saved_searches": {
7783 + "name": "saved_searches",
7784 + "schema": "",
7785 + "columns": {
7786 + "id": {
7787 + "name": "id",
7788 + "type": "text",
7789 + "primaryKey": true,
7790 + "notNull": true
7791 + },
7792 + "user_id": {
7793 + "name": "user_id",
7794 + "type": "text",
7795 + "primaryKey": false,
7796 + "notNull": true
7797 + },
7798 + "name": {
7799 + "name": "name",
7800 + "type": "text",
7801 + "primaryKey": false,
7802 + "notNull": true
7803 + },
7804 + "url": {
7805 + "name": "url",
7806 + "type": "text",
7807 + "primaryKey": false,
7808 + "notNull": true
7809 + },
7810 + "params": {
7811 + "name": "params",
7812 + "type": "jsonb",
7813 + "primaryKey": false,
7814 + "notNull": true,
7815 + "default": "'{}'::jsonb"
7816 + },
7817 + "notify": {
7818 + "name": "notify",
7819 + "type": "boolean",
7820 + "primaryKey": false,
7821 + "notNull": true,
7822 + "default": false
7823 + },
7824 + "last_run_at": {
7825 + "name": "last_run_at",
7826 + "type": "timestamp with time zone",
7827 + "primaryKey": false,
7828 + "notNull": false
7829 + },
7830 + "last_count": {
7831 + "name": "last_count",
7832 + "type": "integer",
7833 + "primaryKey": false,
7834 + "notNull": false
7835 + },
7836 + "created_at": {
7837 + "name": "created_at",
7838 + "type": "timestamp with time zone",
7839 + "primaryKey": false,
7840 + "notNull": true,
7841 + "default": "now()"
7842 + }
7843 + },
7844 + "indexes": {
7845 + "saved_searches_user_idx": {
7846 + "name": "saved_searches_user_idx",
7847 + "columns": [
7848 + {
7849 + "expression": "user_id",
7850 + "isExpression": false,
7851 + "asc": true,
7852 + "nulls": "last"
7853 + }
7854 + ],
7855 + "isUnique": false,
7856 + "concurrently": false,
7857 + "method": "btree",
7858 + "with": {}
7859 + }
7860 + },
7861 + "foreignKeys": {},
7862 + "compositePrimaryKeys": {},
7863 + "uniqueConstraints": {},
7864 + "policies": {},
7865 + "checkConstraints": {},
7866 + "isRLSEnabled": false
7867 + },
7868 + "public.trusted_devices": {
7869 + "name": "trusted_devices",
7870 + "schema": "",
7871 + "columns": {
7872 + "id": {
7873 + "name": "id",
7874 + "type": "text",
7875 + "primaryKey": true,
7876 + "notNull": true
7877 + },
7878 + "user_id": {
7879 + "name": "user_id",
7880 + "type": "text",
7881 + "primaryKey": false,
7882 + "notNull": true
7883 + },
7884 + "token_hash": {
7885 + "name": "token_hash",
7886 + "type": "text",
7887 + "primaryKey": false,
7888 + "notNull": true
7889 + },
7890 + "label": {
7891 + "name": "label",
7892 + "type": "text",
7893 + "primaryKey": false,
7894 + "notNull": false
7895 + },
7896 + "user_agent": {
7897 + "name": "user_agent",
7898 + "type": "text",
7899 + "primaryKey": false,
7900 + "notNull": false
7901 + },
7902 + "ip": {
7903 + "name": "ip",
7904 + "type": "text",
7905 + "primaryKey": false,
7906 + "notNull": false
7907 + },
7908 + "created_at": {
7909 + "name": "created_at",
7910 + "type": "timestamp with time zone",
7911 + "primaryKey": false,
7912 + "notNull": true,
7913 + "default": "now()"
7914 + },
7915 + "last_used_at": {
7916 + "name": "last_used_at",
7917 + "type": "timestamp with time zone",
7918 + "primaryKey": false,
7919 + "notNull": false
7920 + },
7921 + "expires_at": {
7922 + "name": "expires_at",
7923 + "type": "timestamp with time zone",
7924 + "primaryKey": false,
7925 + "notNull": true
7926 + },
7927 + "revoked_at": {
7928 + "name": "revoked_at",
7929 + "type": "timestamp with time zone",
7930 + "primaryKey": false,
7931 + "notNull": false
7932 + }
7933 + },
7934 + "indexes": {
7935 + "trusted_devices_user_idx": {
7936 + "name": "trusted_devices_user_idx",
7937 + "columns": [
7938 + {
7939 + "expression": "user_id",
7940 + "isExpression": false,
7941 + "asc": true,
7942 + "nulls": "last"
7943 + }
7944 + ],
7945 + "isUnique": false,
7946 + "concurrently": false,
7947 + "method": "btree",
7948 + "with": {}
7949 + },
7950 + "trusted_devices_token_uq": {
7951 + "name": "trusted_devices_token_uq",
7952 + "columns": [
7953 + {
7954 + "expression": "token_hash",
7955 + "isExpression": false,
7956 + "asc": true,
7957 + "nulls": "last"
7958 + }
7959 + ],
7960 + "isUnique": true,
7961 + "concurrently": false,
7962 + "method": "btree",
7963 + "with": {}
7964 + }
7965 + },
7966 + "foreignKeys": {},
7967 + "compositePrimaryKeys": {},
7968 + "uniqueConstraints": {},
7969 + "policies": {},
7970 + "checkConstraints": {},
7971 + "isRLSEnabled": false
7972 + },
7973 + "public.uploads": {
7974 + "name": "uploads",
7975 + "schema": "",
7976 + "columns": {
7977 + "id": {
7978 + "name": "id",
7979 + "type": "text",
7980 + "primaryKey": true,
7981 + "notNull": true
7982 + },
7983 + "user_id": {
7984 + "name": "user_id",
7985 + "type": "text",
7986 + "primaryKey": false,
7987 + "notNull": true
7988 + },
7989 + "kind": {
7990 + "name": "kind",
7991 + "type": "text",
7992 + "primaryKey": false,
7993 + "notNull": true
7994 + },
7995 + "path": {
7996 + "name": "path",
7997 + "type": "text",
7998 + "primaryKey": false,
7999 + "notNull": true
8000 + },
8001 + "mime": {
8002 + "name": "mime",
8003 + "type": "text",
8004 + "primaryKey": false,
8005 + "notNull": true
8006 + },
8007 + "bytes": {
8008 + "name": "bytes",
8009 + "type": "integer",
8010 + "primaryKey": false,
8011 + "notNull": true
8012 + },
8013 + "width": {
8014 + "name": "width",
8015 + "type": "integer",
8016 + "primaryKey": false,
8017 + "notNull": false
8018 + },
8019 + "height": {
8020 + "name": "height",
8021 + "type": "integer",
8022 + "primaryKey": false,
8023 + "notNull": false
8024 + },
8025 + "created_at": {
8026 + "name": "created_at",
8027 + "type": "timestamp with time zone",
8028 + "primaryKey": false,
8029 + "notNull": true,
8030 + "default": "now()"
8031 + }
8032 + },
8033 + "indexes": {
8034 + "uploads_user_idx": {
8035 + "name": "uploads_user_idx",
8036 + "columns": [
8037 + {
8038 + "expression": "user_id",
8039 + "isExpression": false,
8040 + "asc": true,
8041 + "nulls": "last"
8042 + }
8043 + ],
8044 + "isUnique": false,
8045 + "concurrently": false,
8046 + "method": "btree",
8047 + "with": {}
8048 + }
8049 + },
8050 + "foreignKeys": {},
8051 + "compositePrimaryKeys": {},
8052 + "uniqueConstraints": {},
8053 + "policies": {},
8054 + "checkConstraints": {},
8055 + "isRLSEnabled": false
8056 + },
8057 + "public.user_badges": {
8058 + "name": "user_badges",
8059 + "schema": "",
8060 + "columns": {
8061 + "user_id": {
8062 + "name": "user_id",
8063 + "type": "text",
8064 + "primaryKey": false,
8065 + "notNull": true
8066 + },
8067 + "badge": {
8068 + "name": "badge",
8069 + "type": "text",
8070 + "primaryKey": false,
8071 + "notNull": true
8072 + },
8073 + "evidence": {
8074 + "name": "evidence",
8075 + "type": "jsonb",
8076 + "primaryKey": false,
8077 + "notNull": true,
8078 + "default": "'{}'::jsonb"
8079 + },
8080 + "created_at": {
8081 + "name": "created_at",
8082 + "type": "timestamp with time zone",
8083 + "primaryKey": false,
8084 + "notNull": true,
8085 + "default": "now()"
8086 + }
8087 + },
8088 + "indexes": {
8089 + "user_badges_uq": {
8090 + "name": "user_badges_uq",
8091 + "columns": [
8092 + {
8093 + "expression": "user_id",
8094 + "isExpression": false,
8095 + "asc": true,
8096 + "nulls": "last"
8097 + },
8098 + {
8099 + "expression": "badge",
8100 + "isExpression": false,
8101 + "asc": true,
8102 + "nulls": "last"
8103 + }
8104 + ],
8105 + "isUnique": true,
8106 + "concurrently": false,
8107 + "method": "btree",
8108 + "with": {}
8109 + }
8110 + },
8111 + "foreignKeys": {},
8112 + "compositePrimaryKeys": {},
8113 + "uniqueConstraints": {},
8114 + "policies": {},
8115 + "checkConstraints": {},
8116 + "isRLSEnabled": false
8117 + }
8118 + },
8119 + "enums": {},
8120 + "schemas": {},
8121 + "sequences": {},
8122 + "roles": {},
8123 + "policies": {},
8124 + "views": {},
8125 + "_meta": {
8126 + "columns": {},
8127 + "schemas": {},
8128 + "tables": {}
8129 + }
8130 +}
\ No newline at end of file
modified packages/database/migrations/meta/_journal.json +7 −0
@@ -15,6 +15,13 @@
15 15 "when": 1788757658711,
16 16 "tag": "0001_living_prima",
17 17 "breakpoints": true
18 + },
19 + {
20 + "idx": 2,
21 + "version": "7",
22 + "when": 1788763418962,
23 + "tag": "0002_broken_the_phantom",
24 + "breakpoints": true
18 25 }
19 26 ]
20 27 }
\ No newline at end of file
21 28