This repository has no description
19 kB
724 lines
1{
2 "id": "1e15b3e8-04ba-4e0a-965e-07142597ddc4",
3 "prevId": "69abc7ad-c872-43e9-8e83-4d9362cf62c7",
4 "version": "7",
5 "dialect": "postgresql",
6 "tables": {
7 "public.app_password_sessions": {
8 "name": "app_password_sessions",
9 "schema": "",
10 "columns": {
11 "did": {
12 "name": "did",
13 "type": "text",
14 "primaryKey": true,
15 "notNull": true
16 },
17 "session_data": {
18 "name": "session_data",
19 "type": "jsonb",
20 "primaryKey": false,
21 "notNull": true
22 },
23 "app_password": {
24 "name": "app_password",
25 "type": "text",
26 "primaryKey": false,
27 "notNull": true
28 },
29 "created_at": {
30 "name": "created_at",
31 "type": "timestamp",
32 "primaryKey": false,
33 "notNull": false,
34 "default": "now()"
35 },
36 "updated_at": {
37 "name": "updated_at",
38 "type": "timestamp",
39 "primaryKey": false,
40 "notNull": false,
41 "default": "now()"
42 }
43 },
44 "indexes": {},
45 "foreignKeys": {},
46 "compositePrimaryKeys": {},
47 "uniqueConstraints": {},
48 "policies": {},
49 "checkConstraints": {},
50 "isRLSEnabled": false
51 },
52 "public.cards": {
53 "name": "cards",
54 "schema": "",
55 "columns": {
56 "id": {
57 "name": "id",
58 "type": "uuid",
59 "primaryKey": true,
60 "notNull": true
61 },
62 "author_id": {
63 "name": "author_id",
64 "type": "text",
65 "primaryKey": false,
66 "notNull": true
67 },
68 "type": {
69 "name": "type",
70 "type": "text",
71 "primaryKey": false,
72 "notNull": true
73 },
74 "content_data": {
75 "name": "content_data",
76 "type": "jsonb",
77 "primaryKey": false,
78 "notNull": true
79 },
80 "url": {
81 "name": "url",
82 "type": "text",
83 "primaryKey": false,
84 "notNull": false
85 },
86 "parent_card_id": {
87 "name": "parent_card_id",
88 "type": "uuid",
89 "primaryKey": false,
90 "notNull": false
91 },
92 "published_record_id": {
93 "name": "published_record_id",
94 "type": "uuid",
95 "primaryKey": false,
96 "notNull": false
97 },
98 "library_count": {
99 "name": "library_count",
100 "type": "integer",
101 "primaryKey": false,
102 "notNull": true,
103 "default": 0
104 },
105 "created_at": {
106 "name": "created_at",
107 "type": "timestamp",
108 "primaryKey": false,
109 "notNull": true,
110 "default": "now()"
111 },
112 "updated_at": {
113 "name": "updated_at",
114 "type": "timestamp",
115 "primaryKey": false,
116 "notNull": true,
117 "default": "now()"
118 }
119 },
120 "indexes": {},
121 "foreignKeys": {
122 "cards_parent_card_id_cards_id_fk": {
123 "name": "cards_parent_card_id_cards_id_fk",
124 "tableFrom": "cards",
125 "tableTo": "cards",
126 "columnsFrom": ["parent_card_id"],
127 "columnsTo": ["id"],
128 "onDelete": "no action",
129 "onUpdate": "no action"
130 },
131 "cards_published_record_id_published_records_id_fk": {
132 "name": "cards_published_record_id_published_records_id_fk",
133 "tableFrom": "cards",
134 "tableTo": "published_records",
135 "columnsFrom": ["published_record_id"],
136 "columnsTo": ["id"],
137 "onDelete": "no action",
138 "onUpdate": "no action"
139 }
140 },
141 "compositePrimaryKeys": {},
142 "uniqueConstraints": {},
143 "policies": {},
144 "checkConstraints": {},
145 "isRLSEnabled": false
146 },
147 "public.collection_cards": {
148 "name": "collection_cards",
149 "schema": "",
150 "columns": {
151 "id": {
152 "name": "id",
153 "type": "uuid",
154 "primaryKey": true,
155 "notNull": true
156 },
157 "collection_id": {
158 "name": "collection_id",
159 "type": "uuid",
160 "primaryKey": false,
161 "notNull": true
162 },
163 "card_id": {
164 "name": "card_id",
165 "type": "uuid",
166 "primaryKey": false,
167 "notNull": true
168 },
169 "added_by": {
170 "name": "added_by",
171 "type": "text",
172 "primaryKey": false,
173 "notNull": true
174 },
175 "added_at": {
176 "name": "added_at",
177 "type": "timestamp",
178 "primaryKey": false,
179 "notNull": true,
180 "default": "now()"
181 },
182 "published_record_id": {
183 "name": "published_record_id",
184 "type": "uuid",
185 "primaryKey": false,
186 "notNull": false
187 }
188 },
189 "indexes": {},
190 "foreignKeys": {
191 "collection_cards_collection_id_collections_id_fk": {
192 "name": "collection_cards_collection_id_collections_id_fk",
193 "tableFrom": "collection_cards",
194 "tableTo": "collections",
195 "columnsFrom": ["collection_id"],
196 "columnsTo": ["id"],
197 "onDelete": "cascade",
198 "onUpdate": "no action"
199 },
200 "collection_cards_card_id_cards_id_fk": {
201 "name": "collection_cards_card_id_cards_id_fk",
202 "tableFrom": "collection_cards",
203 "tableTo": "cards",
204 "columnsFrom": ["card_id"],
205 "columnsTo": ["id"],
206 "onDelete": "cascade",
207 "onUpdate": "no action"
208 },
209 "collection_cards_published_record_id_published_records_id_fk": {
210 "name": "collection_cards_published_record_id_published_records_id_fk",
211 "tableFrom": "collection_cards",
212 "tableTo": "published_records",
213 "columnsFrom": ["published_record_id"],
214 "columnsTo": ["id"],
215 "onDelete": "no action",
216 "onUpdate": "no action"
217 }
218 },
219 "compositePrimaryKeys": {},
220 "uniqueConstraints": {},
221 "policies": {},
222 "checkConstraints": {},
223 "isRLSEnabled": false
224 },
225 "public.collection_collaborators": {
226 "name": "collection_collaborators",
227 "schema": "",
228 "columns": {
229 "id": {
230 "name": "id",
231 "type": "uuid",
232 "primaryKey": true,
233 "notNull": true
234 },
235 "collection_id": {
236 "name": "collection_id",
237 "type": "uuid",
238 "primaryKey": false,
239 "notNull": true
240 },
241 "collaborator_id": {
242 "name": "collaborator_id",
243 "type": "text",
244 "primaryKey": false,
245 "notNull": true
246 }
247 },
248 "indexes": {},
249 "foreignKeys": {
250 "collection_collaborators_collection_id_collections_id_fk": {
251 "name": "collection_collaborators_collection_id_collections_id_fk",
252 "tableFrom": "collection_collaborators",
253 "tableTo": "collections",
254 "columnsFrom": ["collection_id"],
255 "columnsTo": ["id"],
256 "onDelete": "cascade",
257 "onUpdate": "no action"
258 }
259 },
260 "compositePrimaryKeys": {},
261 "uniqueConstraints": {},
262 "policies": {},
263 "checkConstraints": {},
264 "isRLSEnabled": false
265 },
266 "public.collections": {
267 "name": "collections",
268 "schema": "",
269 "columns": {
270 "id": {
271 "name": "id",
272 "type": "uuid",
273 "primaryKey": true,
274 "notNull": true
275 },
276 "author_id": {
277 "name": "author_id",
278 "type": "text",
279 "primaryKey": false,
280 "notNull": true
281 },
282 "name": {
283 "name": "name",
284 "type": "text",
285 "primaryKey": false,
286 "notNull": true
287 },
288 "description": {
289 "name": "description",
290 "type": "text",
291 "primaryKey": false,
292 "notNull": false
293 },
294 "access_type": {
295 "name": "access_type",
296 "type": "text",
297 "primaryKey": false,
298 "notNull": true
299 },
300 "card_count": {
301 "name": "card_count",
302 "type": "integer",
303 "primaryKey": false,
304 "notNull": true,
305 "default": 0
306 },
307 "created_at": {
308 "name": "created_at",
309 "type": "timestamp",
310 "primaryKey": false,
311 "notNull": true,
312 "default": "now()"
313 },
314 "updated_at": {
315 "name": "updated_at",
316 "type": "timestamp",
317 "primaryKey": false,
318 "notNull": true,
319 "default": "now()"
320 },
321 "published_record_id": {
322 "name": "published_record_id",
323 "type": "uuid",
324 "primaryKey": false,
325 "notNull": false
326 }
327 },
328 "indexes": {},
329 "foreignKeys": {
330 "collections_published_record_id_published_records_id_fk": {
331 "name": "collections_published_record_id_published_records_id_fk",
332 "tableFrom": "collections",
333 "tableTo": "published_records",
334 "columnsFrom": ["published_record_id"],
335 "columnsTo": ["id"],
336 "onDelete": "no action",
337 "onUpdate": "no action"
338 }
339 },
340 "compositePrimaryKeys": {},
341 "uniqueConstraints": {},
342 "policies": {},
343 "checkConstraints": {},
344 "isRLSEnabled": false
345 },
346 "public.library_memberships": {
347 "name": "library_memberships",
348 "schema": "",
349 "columns": {
350 "card_id": {
351 "name": "card_id",
352 "type": "uuid",
353 "primaryKey": false,
354 "notNull": true
355 },
356 "user_id": {
357 "name": "user_id",
358 "type": "text",
359 "primaryKey": false,
360 "notNull": true
361 },
362 "added_at": {
363 "name": "added_at",
364 "type": "timestamp",
365 "primaryKey": false,
366 "notNull": true,
367 "default": "now()"
368 },
369 "published_record_id": {
370 "name": "published_record_id",
371 "type": "uuid",
372 "primaryKey": false,
373 "notNull": false
374 }
375 },
376 "indexes": {
377 "idx_user_cards": {
378 "name": "idx_user_cards",
379 "columns": [
380 {
381 "expression": "user_id",
382 "isExpression": false,
383 "asc": true,
384 "nulls": "last"
385 }
386 ],
387 "isUnique": false,
388 "concurrently": false,
389 "method": "btree",
390 "with": {}
391 },
392 "idx_card_users": {
393 "name": "idx_card_users",
394 "columns": [
395 {
396 "expression": "card_id",
397 "isExpression": false,
398 "asc": true,
399 "nulls": "last"
400 }
401 ],
402 "isUnique": false,
403 "concurrently": false,
404 "method": "btree",
405 "with": {}
406 }
407 },
408 "foreignKeys": {
409 "library_memberships_card_id_cards_id_fk": {
410 "name": "library_memberships_card_id_cards_id_fk",
411 "tableFrom": "library_memberships",
412 "tableTo": "cards",
413 "columnsFrom": ["card_id"],
414 "columnsTo": ["id"],
415 "onDelete": "cascade",
416 "onUpdate": "no action"
417 },
418 "library_memberships_published_record_id_published_records_id_fk": {
419 "name": "library_memberships_published_record_id_published_records_id_fk",
420 "tableFrom": "library_memberships",
421 "tableTo": "published_records",
422 "columnsFrom": ["published_record_id"],
423 "columnsTo": ["id"],
424 "onDelete": "no action",
425 "onUpdate": "no action"
426 }
427 },
428 "compositePrimaryKeys": {
429 "library_memberships_card_id_user_id_pk": {
430 "name": "library_memberships_card_id_user_id_pk",
431 "columns": ["card_id", "user_id"]
432 }
433 },
434 "uniqueConstraints": {},
435 "policies": {},
436 "checkConstraints": {},
437 "isRLSEnabled": false
438 },
439 "public.published_records": {
440 "name": "published_records",
441 "schema": "",
442 "columns": {
443 "id": {
444 "name": "id",
445 "type": "uuid",
446 "primaryKey": true,
447 "notNull": true
448 },
449 "uri": {
450 "name": "uri",
451 "type": "text",
452 "primaryKey": false,
453 "notNull": true
454 },
455 "cid": {
456 "name": "cid",
457 "type": "text",
458 "primaryKey": false,
459 "notNull": true
460 },
461 "recorded_at": {
462 "name": "recorded_at",
463 "type": "timestamp",
464 "primaryKey": false,
465 "notNull": true,
466 "default": "now()"
467 }
468 },
469 "indexes": {
470 "uri_cid_unique_idx": {
471 "name": "uri_cid_unique_idx",
472 "columns": [
473 {
474 "expression": "uri",
475 "isExpression": false,
476 "asc": true,
477 "nulls": "last"
478 },
479 {
480 "expression": "cid",
481 "isExpression": false,
482 "asc": true,
483 "nulls": "last"
484 }
485 ],
486 "isUnique": true,
487 "concurrently": false,
488 "method": "btree",
489 "with": {}
490 },
491 "published_records_uri_idx": {
492 "name": "published_records_uri_idx",
493 "columns": [
494 {
495 "expression": "uri",
496 "isExpression": false,
497 "asc": true,
498 "nulls": "last"
499 }
500 ],
501 "isUnique": false,
502 "concurrently": false,
503 "method": "btree",
504 "with": {}
505 }
506 },
507 "foreignKeys": {},
508 "compositePrimaryKeys": {},
509 "uniqueConstraints": {},
510 "policies": {},
511 "checkConstraints": {},
512 "isRLSEnabled": false
513 },
514 "public.feed_activities": {
515 "name": "feed_activities",
516 "schema": "",
517 "columns": {
518 "id": {
519 "name": "id",
520 "type": "uuid",
521 "primaryKey": true,
522 "notNull": true
523 },
524 "actor_id": {
525 "name": "actor_id",
526 "type": "text",
527 "primaryKey": false,
528 "notNull": true
529 },
530 "type": {
531 "name": "type",
532 "type": "text",
533 "primaryKey": false,
534 "notNull": true
535 },
536 "metadata": {
537 "name": "metadata",
538 "type": "jsonb",
539 "primaryKey": false,
540 "notNull": true
541 },
542 "created_at": {
543 "name": "created_at",
544 "type": "timestamp",
545 "primaryKey": false,
546 "notNull": true,
547 "default": "now()"
548 }
549 },
550 "indexes": {},
551 "foreignKeys": {},
552 "compositePrimaryKeys": {},
553 "uniqueConstraints": {},
554 "policies": {},
555 "checkConstraints": {},
556 "isRLSEnabled": false
557 },
558 "public.auth_session": {
559 "name": "auth_session",
560 "schema": "",
561 "columns": {
562 "key": {
563 "name": "key",
564 "type": "text",
565 "primaryKey": true,
566 "notNull": true
567 },
568 "session": {
569 "name": "session",
570 "type": "text",
571 "primaryKey": false,
572 "notNull": true
573 }
574 },
575 "indexes": {},
576 "foreignKeys": {},
577 "compositePrimaryKeys": {},
578 "uniqueConstraints": {},
579 "policies": {},
580 "checkConstraints": {},
581 "isRLSEnabled": false
582 },
583 "public.auth_state": {
584 "name": "auth_state",
585 "schema": "",
586 "columns": {
587 "key": {
588 "name": "key",
589 "type": "text",
590 "primaryKey": true,
591 "notNull": true
592 },
593 "state": {
594 "name": "state",
595 "type": "text",
596 "primaryKey": false,
597 "notNull": true
598 },
599 "created_at": {
600 "name": "created_at",
601 "type": "timestamp",
602 "primaryKey": false,
603 "notNull": false,
604 "default": "now()"
605 }
606 },
607 "indexes": {},
608 "foreignKeys": {},
609 "compositePrimaryKeys": {},
610 "uniqueConstraints": {},
611 "policies": {},
612 "checkConstraints": {},
613 "isRLSEnabled": false
614 },
615 "public.auth_refresh_tokens": {
616 "name": "auth_refresh_tokens",
617 "schema": "",
618 "columns": {
619 "token_id": {
620 "name": "token_id",
621 "type": "text",
622 "primaryKey": true,
623 "notNull": true
624 },
625 "user_did": {
626 "name": "user_did",
627 "type": "text",
628 "primaryKey": false,
629 "notNull": true
630 },
631 "refresh_token": {
632 "name": "refresh_token",
633 "type": "text",
634 "primaryKey": false,
635 "notNull": true
636 },
637 "issued_at": {
638 "name": "issued_at",
639 "type": "timestamp",
640 "primaryKey": false,
641 "notNull": true
642 },
643 "expires_at": {
644 "name": "expires_at",
645 "type": "timestamp",
646 "primaryKey": false,
647 "notNull": true
648 },
649 "revoked": {
650 "name": "revoked",
651 "type": "boolean",
652 "primaryKey": false,
653 "notNull": false,
654 "default": false
655 }
656 },
657 "indexes": {},
658 "foreignKeys": {
659 "auth_refresh_tokens_user_did_users_id_fk": {
660 "name": "auth_refresh_tokens_user_did_users_id_fk",
661 "tableFrom": "auth_refresh_tokens",
662 "tableTo": "users",
663 "columnsFrom": ["user_did"],
664 "columnsTo": ["id"],
665 "onDelete": "no action",
666 "onUpdate": "no action"
667 }
668 },
669 "compositePrimaryKeys": {},
670 "uniqueConstraints": {},
671 "policies": {},
672 "checkConstraints": {},
673 "isRLSEnabled": false
674 },
675 "public.users": {
676 "name": "users",
677 "schema": "",
678 "columns": {
679 "id": {
680 "name": "id",
681 "type": "text",
682 "primaryKey": true,
683 "notNull": true
684 },
685 "handle": {
686 "name": "handle",
687 "type": "text",
688 "primaryKey": false,
689 "notNull": false
690 },
691 "linked_at": {
692 "name": "linked_at",
693 "type": "timestamp",
694 "primaryKey": false,
695 "notNull": true
696 },
697 "last_login_at": {
698 "name": "last_login_at",
699 "type": "timestamp",
700 "primaryKey": false,
701 "notNull": true
702 }
703 },
704 "indexes": {},
705 "foreignKeys": {},
706 "compositePrimaryKeys": {},
707 "uniqueConstraints": {},
708 "policies": {},
709 "checkConstraints": {},
710 "isRLSEnabled": false
711 }
712 },
713 "enums": {},
714 "schemas": {},
715 "sequences": {},
716 "roles": {},
717 "policies": {},
718 "views": {},
719 "_meta": {
720 "columns": {},
721 "schemas": {},
722 "tables": {}
723 }
724}