···
1
1
+
CREATE TABLE "connections" (
2
2
+
"id" uuid PRIMARY KEY NOT NULL,
3
3
+
"curator_id" text NOT NULL,
4
4
+
"source_type" text NOT NULL,
5
5
+
"source_value" text NOT NULL,
6
6
+
"target_type" text NOT NULL,
7
7
+
"target_value" text NOT NULL,
8
8
+
"connection_type" text,
9
9
+
"note" text,
10
10
+
"published_record_id" uuid,
11
11
+
"created_at" timestamp DEFAULT now() NOT NULL,
12
12
+
"updated_at" timestamp DEFAULT now() NOT NULL
13
13
+
);
14
14
+
--> statement-breakpoint
15
15
+
ALTER TABLE "connections" ADD CONSTRAINT "connections_published_record_id_published_records_id_fk" FOREIGN KEY ("published_record_id") REFERENCES "public"."published_records"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
16
16
+
CREATE INDEX "connections_curator_id_idx" ON "connections" USING btree ("curator_id");--> statement-breakpoint
17
17
+
CREATE INDEX "connections_source_idx" ON "connections" USING btree ("source_type","source_value");--> statement-breakpoint
18
18
+
CREATE INDEX "connections_target_idx" ON "connections" USING btree ("target_type","target_value");--> statement-breakpoint
19
19
+
CREATE INDEX "connections_created_at_idx" ON "connections" USING btree ("created_at" DESC NULLS LAST);--> statement-breakpoint
20
20
+
CREATE INDEX "connections_curator_created_at_idx" ON "connections" USING btree ("curator_id","created_at" DESC NULLS LAST);
···
1
1
+
{
2
2
+
"id": "8816e49e-c7eb-497e-9958-c8997762c985",
3
3
+
"prevId": "3c3e6afe-11db-4e0c-918b-e358b4a761e4",
4
4
+
"version": "7",
5
5
+
"dialect": "postgresql",
6
6
+
"tables": {
7
7
+
"public.app_password_sessions": {
8
8
+
"name": "app_password_sessions",
9
9
+
"schema": "",
10
10
+
"columns": {
11
11
+
"did": {
12
12
+
"name": "did",
13
13
+
"type": "text",
14
14
+
"primaryKey": true,
15
15
+
"notNull": true
16
16
+
},
17
17
+
"session_data": {
18
18
+
"name": "session_data",
19
19
+
"type": "jsonb",
20
20
+
"primaryKey": false,
21
21
+
"notNull": true
22
22
+
},
23
23
+
"app_password": {
24
24
+
"name": "app_password",
25
25
+
"type": "text",
26
26
+
"primaryKey": false,
27
27
+
"notNull": true
28
28
+
},
29
29
+
"created_at": {
30
30
+
"name": "created_at",
31
31
+
"type": "timestamp",
32
32
+
"primaryKey": false,
33
33
+
"notNull": false,
34
34
+
"default": "now()"
35
35
+
},
36
36
+
"updated_at": {
37
37
+
"name": "updated_at",
38
38
+
"type": "timestamp",
39
39
+
"primaryKey": false,
40
40
+
"notNull": false,
41
41
+
"default": "now()"
42
42
+
}
43
43
+
},
44
44
+
"indexes": {},
45
45
+
"foreignKeys": {},
46
46
+
"compositePrimaryKeys": {},
47
47
+
"uniqueConstraints": {},
48
48
+
"policies": {},
49
49
+
"checkConstraints": {},
50
50
+
"isRLSEnabled": false
51
51
+
},
52
52
+
"public.cards": {
53
53
+
"name": "cards",
54
54
+
"schema": "",
55
55
+
"columns": {
56
56
+
"id": {
57
57
+
"name": "id",
58
58
+
"type": "uuid",
59
59
+
"primaryKey": true,
60
60
+
"notNull": true
61
61
+
},
62
62
+
"author_id": {
63
63
+
"name": "author_id",
64
64
+
"type": "text",
65
65
+
"primaryKey": false,
66
66
+
"notNull": true
67
67
+
},
68
68
+
"type": {
69
69
+
"name": "type",
70
70
+
"type": "text",
71
71
+
"primaryKey": false,
72
72
+
"notNull": true
73
73
+
},
74
74
+
"content_data": {
75
75
+
"name": "content_data",
76
76
+
"type": "jsonb",
77
77
+
"primaryKey": false,
78
78
+
"notNull": true
79
79
+
},
80
80
+
"url": {
81
81
+
"name": "url",
82
82
+
"type": "text",
83
83
+
"primaryKey": false,
84
84
+
"notNull": false
85
85
+
},
86
86
+
"url_type": {
87
87
+
"name": "url_type",
88
88
+
"type": "text",
89
89
+
"primaryKey": false,
90
90
+
"notNull": false
91
91
+
},
92
92
+
"parent_card_id": {
93
93
+
"name": "parent_card_id",
94
94
+
"type": "uuid",
95
95
+
"primaryKey": false,
96
96
+
"notNull": false
97
97
+
},
98
98
+
"via_card_id": {
99
99
+
"name": "via_card_id",
100
100
+
"type": "uuid",
101
101
+
"primaryKey": false,
102
102
+
"notNull": false
103
103
+
},
104
104
+
"published_record_id": {
105
105
+
"name": "published_record_id",
106
106
+
"type": "uuid",
107
107
+
"primaryKey": false,
108
108
+
"notNull": false
109
109
+
},
110
110
+
"library_count": {
111
111
+
"name": "library_count",
112
112
+
"type": "integer",
113
113
+
"primaryKey": false,
114
114
+
"notNull": true,
115
115
+
"default": 0
116
116
+
},
117
117
+
"created_at": {
118
118
+
"name": "created_at",
119
119
+
"type": "timestamp",
120
120
+
"primaryKey": false,
121
121
+
"notNull": true,
122
122
+
"default": "now()"
123
123
+
},
124
124
+
"updated_at": {
125
125
+
"name": "updated_at",
126
126
+
"type": "timestamp",
127
127
+
"primaryKey": false,
128
128
+
"notNull": true,
129
129
+
"default": "now()"
130
130
+
}
131
131
+
},
132
132
+
"indexes": {
133
133
+
"cards_author_url_idx": {
134
134
+
"name": "cards_author_url_idx",
135
135
+
"columns": [
136
136
+
{
137
137
+
"expression": "author_id",
138
138
+
"isExpression": false,
139
139
+
"asc": true,
140
140
+
"nulls": "last"
141
141
+
},
142
142
+
{
143
143
+
"expression": "url",
144
144
+
"isExpression": false,
145
145
+
"asc": true,
146
146
+
"nulls": "last"
147
147
+
}
148
148
+
],
149
149
+
"isUnique": false,
150
150
+
"concurrently": false,
151
151
+
"method": "btree",
152
152
+
"with": {}
153
153
+
},
154
154
+
"cards_author_id_idx": {
155
155
+
"name": "cards_author_id_idx",
156
156
+
"columns": [
157
157
+
{
158
158
+
"expression": "author_id",
159
159
+
"isExpression": false,
160
160
+
"asc": true,
161
161
+
"nulls": "last"
162
162
+
}
163
163
+
],
164
164
+
"isUnique": false,
165
165
+
"concurrently": false,
166
166
+
"method": "btree",
167
167
+
"with": {}
168
168
+
},
169
169
+
"idx_cards_type_updated_at": {
170
170
+
"name": "idx_cards_type_updated_at",
171
171
+
"columns": [
172
172
+
{
173
173
+
"expression": "type",
174
174
+
"isExpression": false,
175
175
+
"asc": true,
176
176
+
"nulls": "last"
177
177
+
},
178
178
+
{
179
179
+
"expression": "updated_at",
180
180
+
"isExpression": false,
181
181
+
"asc": false,
182
182
+
"nulls": "last"
183
183
+
}
184
184
+
],
185
185
+
"isUnique": false,
186
186
+
"concurrently": false,
187
187
+
"method": "btree",
188
188
+
"with": {}
189
189
+
},
190
190
+
"idx_cards_url_type": {
191
191
+
"name": "idx_cards_url_type",
192
192
+
"columns": [
193
193
+
{
194
194
+
"expression": "url",
195
195
+
"isExpression": false,
196
196
+
"asc": true,
197
197
+
"nulls": "last"
198
198
+
},
199
199
+
{
200
200
+
"expression": "type",
201
201
+
"isExpression": false,
202
202
+
"asc": true,
203
203
+
"nulls": "last"
204
204
+
}
205
205
+
],
206
206
+
"isUnique": false,
207
207
+
"concurrently": false,
208
208
+
"method": "btree",
209
209
+
"with": {}
210
210
+
},
211
211
+
"idx_cards_url_type_filter": {
212
212
+
"name": "idx_cards_url_type_filter",
213
213
+
"columns": [
214
214
+
{
215
215
+
"expression": "url_type",
216
216
+
"isExpression": false,
217
217
+
"asc": true,
218
218
+
"nulls": "last"
219
219
+
}
220
220
+
],
221
221
+
"isUnique": false,
222
222
+
"concurrently": false,
223
223
+
"method": "btree",
224
224
+
"with": {}
225
225
+
},
226
226
+
"idx_cards_parent_type": {
227
227
+
"name": "idx_cards_parent_type",
228
228
+
"columns": [
229
229
+
{
230
230
+
"expression": "parent_card_id",
231
231
+
"isExpression": false,
232
232
+
"asc": true,
233
233
+
"nulls": "last"
234
234
+
},
235
235
+
{
236
236
+
"expression": "type",
237
237
+
"isExpression": false,
238
238
+
"asc": true,
239
239
+
"nulls": "last"
240
240
+
}
241
241
+
],
242
242
+
"isUnique": false,
243
243
+
"where": "type = 'NOTE'",
244
244
+
"concurrently": false,
245
245
+
"method": "btree",
246
246
+
"with": {}
247
247
+
}
248
248
+
},
249
249
+
"foreignKeys": {
250
250
+
"cards_parent_card_id_cards_id_fk": {
251
251
+
"name": "cards_parent_card_id_cards_id_fk",
252
252
+
"tableFrom": "cards",
253
253
+
"tableTo": "cards",
254
254
+
"columnsFrom": ["parent_card_id"],
255
255
+
"columnsTo": ["id"],
256
256
+
"onDelete": "no action",
257
257
+
"onUpdate": "no action"
258
258
+
},
259
259
+
"cards_via_card_id_cards_id_fk": {
260
260
+
"name": "cards_via_card_id_cards_id_fk",
261
261
+
"tableFrom": "cards",
262
262
+
"tableTo": "cards",
263
263
+
"columnsFrom": ["via_card_id"],
264
264
+
"columnsTo": ["id"],
265
265
+
"onDelete": "no action",
266
266
+
"onUpdate": "no action"
267
267
+
},
268
268
+
"cards_published_record_id_published_records_id_fk": {
269
269
+
"name": "cards_published_record_id_published_records_id_fk",
270
270
+
"tableFrom": "cards",
271
271
+
"tableTo": "published_records",
272
272
+
"columnsFrom": ["published_record_id"],
273
273
+
"columnsTo": ["id"],
274
274
+
"onDelete": "no action",
275
275
+
"onUpdate": "no action"
276
276
+
}
277
277
+
},
278
278
+
"compositePrimaryKeys": {},
279
279
+
"uniqueConstraints": {},
280
280
+
"policies": {},
281
281
+
"checkConstraints": {},
282
282
+
"isRLSEnabled": false
283
283
+
},
284
284
+
"public.collection_cards": {
285
285
+
"name": "collection_cards",
286
286
+
"schema": "",
287
287
+
"columns": {
288
288
+
"id": {
289
289
+
"name": "id",
290
290
+
"type": "uuid",
291
291
+
"primaryKey": true,
292
292
+
"notNull": true
293
293
+
},
294
294
+
"collection_id": {
295
295
+
"name": "collection_id",
296
296
+
"type": "uuid",
297
297
+
"primaryKey": false,
298
298
+
"notNull": true
299
299
+
},
300
300
+
"card_id": {
301
301
+
"name": "card_id",
302
302
+
"type": "uuid",
303
303
+
"primaryKey": false,
304
304
+
"notNull": true
305
305
+
},
306
306
+
"added_by": {
307
307
+
"name": "added_by",
308
308
+
"type": "text",
309
309
+
"primaryKey": false,
310
310
+
"notNull": true
311
311
+
},
312
312
+
"added_at": {
313
313
+
"name": "added_at",
314
314
+
"type": "timestamp",
315
315
+
"primaryKey": false,
316
316
+
"notNull": true,
317
317
+
"default": "now()"
318
318
+
},
319
319
+
"via_card_id": {
320
320
+
"name": "via_card_id",
321
321
+
"type": "uuid",
322
322
+
"primaryKey": false,
323
323
+
"notNull": false
324
324
+
},
325
325
+
"published_record_id": {
326
326
+
"name": "published_record_id",
327
327
+
"type": "uuid",
328
328
+
"primaryKey": false,
329
329
+
"notNull": false
330
330
+
}
331
331
+
},
332
332
+
"indexes": {
333
333
+
"collection_cards_card_id_idx": {
334
334
+
"name": "collection_cards_card_id_idx",
335
335
+
"columns": [
336
336
+
{
337
337
+
"expression": "card_id",
338
338
+
"isExpression": false,
339
339
+
"asc": true,
340
340
+
"nulls": "last"
341
341
+
}
342
342
+
],
343
343
+
"isUnique": false,
344
344
+
"concurrently": false,
345
345
+
"method": "btree",
346
346
+
"with": {}
347
347
+
},
348
348
+
"collection_cards_collection_id_idx": {
349
349
+
"name": "collection_cards_collection_id_idx",
350
350
+
"columns": [
351
351
+
{
352
352
+
"expression": "collection_id",
353
353
+
"isExpression": false,
354
354
+
"asc": true,
355
355
+
"nulls": "last"
356
356
+
}
357
357
+
],
358
358
+
"isUnique": false,
359
359
+
"concurrently": false,
360
360
+
"method": "btree",
361
361
+
"with": {}
362
362
+
},
363
363
+
"idx_collection_cards_collection_added": {
364
364
+
"name": "idx_collection_cards_collection_added",
365
365
+
"columns": [
366
366
+
{
367
367
+
"expression": "collection_id",
368
368
+
"isExpression": false,
369
369
+
"asc": true,
370
370
+
"nulls": "last"
371
371
+
},
372
372
+
{
373
373
+
"expression": "added_at",
374
374
+
"isExpression": false,
375
375
+
"asc": false,
376
376
+
"nulls": "last"
377
377
+
}
378
378
+
],
379
379
+
"isUnique": false,
380
380
+
"concurrently": false,
381
381
+
"method": "btree",
382
382
+
"with": {}
383
383
+
},
384
384
+
"idx_collection_cards_card_collection": {
385
385
+
"name": "idx_collection_cards_card_collection",
386
386
+
"columns": [
387
387
+
{
388
388
+
"expression": "card_id",
389
389
+
"isExpression": false,
390
390
+
"asc": true,
391
391
+
"nulls": "last"
392
392
+
}
393
393
+
],
394
394
+
"isUnique": false,
395
395
+
"concurrently": false,
396
396
+
"method": "btree",
397
397
+
"with": {}
398
398
+
},
399
399
+
"idx_collection_cards_added_by_added_at": {
400
400
+
"name": "idx_collection_cards_added_by_added_at",
401
401
+
"columns": [
402
402
+
{
403
403
+
"expression": "added_by",
404
404
+
"isExpression": false,
405
405
+
"asc": true,
406
406
+
"nulls": "last"
407
407
+
},
408
408
+
{
409
409
+
"expression": "added_at",
410
410
+
"isExpression": false,
411
411
+
"asc": false,
412
412
+
"nulls": "last"
413
413
+
}
414
414
+
],
415
415
+
"isUnique": false,
416
416
+
"concurrently": false,
417
417
+
"method": "btree",
418
418
+
"with": {}
419
419
+
}
420
420
+
},
421
421
+
"foreignKeys": {
422
422
+
"collection_cards_collection_id_collections_id_fk": {
423
423
+
"name": "collection_cards_collection_id_collections_id_fk",
424
424
+
"tableFrom": "collection_cards",
425
425
+
"tableTo": "collections",
426
426
+
"columnsFrom": ["collection_id"],
427
427
+
"columnsTo": ["id"],
428
428
+
"onDelete": "cascade",
429
429
+
"onUpdate": "no action"
430
430
+
},
431
431
+
"collection_cards_card_id_cards_id_fk": {
432
432
+
"name": "collection_cards_card_id_cards_id_fk",
433
433
+
"tableFrom": "collection_cards",
434
434
+
"tableTo": "cards",
435
435
+
"columnsFrom": ["card_id"],
436
436
+
"columnsTo": ["id"],
437
437
+
"onDelete": "cascade",
438
438
+
"onUpdate": "no action"
439
439
+
},
440
440
+
"collection_cards_via_card_id_cards_id_fk": {
441
441
+
"name": "collection_cards_via_card_id_cards_id_fk",
442
442
+
"tableFrom": "collection_cards",
443
443
+
"tableTo": "cards",
444
444
+
"columnsFrom": ["via_card_id"],
445
445
+
"columnsTo": ["id"],
446
446
+
"onDelete": "no action",
447
447
+
"onUpdate": "no action"
448
448
+
},
449
449
+
"collection_cards_published_record_id_published_records_id_fk": {
450
450
+
"name": "collection_cards_published_record_id_published_records_id_fk",
451
451
+
"tableFrom": "collection_cards",
452
452
+
"tableTo": "published_records",
453
453
+
"columnsFrom": ["published_record_id"],
454
454
+
"columnsTo": ["id"],
455
455
+
"onDelete": "no action",
456
456
+
"onUpdate": "no action"
457
457
+
}
458
458
+
},
459
459
+
"compositePrimaryKeys": {},
460
460
+
"uniqueConstraints": {},
461
461
+
"policies": {},
462
462
+
"checkConstraints": {},
463
463
+
"isRLSEnabled": false
464
464
+
},
465
465
+
"public.collection_collaborators": {
466
466
+
"name": "collection_collaborators",
467
467
+
"schema": "",
468
468
+
"columns": {
469
469
+
"id": {
470
470
+
"name": "id",
471
471
+
"type": "uuid",
472
472
+
"primaryKey": true,
473
473
+
"notNull": true
474
474
+
},
475
475
+
"collection_id": {
476
476
+
"name": "collection_id",
477
477
+
"type": "uuid",
478
478
+
"primaryKey": false,
479
479
+
"notNull": true
480
480
+
},
481
481
+
"collaborator_id": {
482
482
+
"name": "collaborator_id",
483
483
+
"type": "text",
484
484
+
"primaryKey": false,
485
485
+
"notNull": true
486
486
+
}
487
487
+
},
488
488
+
"indexes": {},
489
489
+
"foreignKeys": {
490
490
+
"collection_collaborators_collection_id_collections_id_fk": {
491
491
+
"name": "collection_collaborators_collection_id_collections_id_fk",
492
492
+
"tableFrom": "collection_collaborators",
493
493
+
"tableTo": "collections",
494
494
+
"columnsFrom": ["collection_id"],
495
495
+
"columnsTo": ["id"],
496
496
+
"onDelete": "cascade",
497
497
+
"onUpdate": "no action"
498
498
+
}
499
499
+
},
500
500
+
"compositePrimaryKeys": {},
501
501
+
"uniqueConstraints": {},
502
502
+
"policies": {},
503
503
+
"checkConstraints": {},
504
504
+
"isRLSEnabled": false
505
505
+
},
506
506
+
"public.collections": {
507
507
+
"name": "collections",
508
508
+
"schema": "",
509
509
+
"columns": {
510
510
+
"id": {
511
511
+
"name": "id",
512
512
+
"type": "uuid",
513
513
+
"primaryKey": true,
514
514
+
"notNull": true
515
515
+
},
516
516
+
"author_id": {
517
517
+
"name": "author_id",
518
518
+
"type": "text",
519
519
+
"primaryKey": false,
520
520
+
"notNull": true
521
521
+
},
522
522
+
"name": {
523
523
+
"name": "name",
524
524
+
"type": "text",
525
525
+
"primaryKey": false,
526
526
+
"notNull": true
527
527
+
},
528
528
+
"description": {
529
529
+
"name": "description",
530
530
+
"type": "text",
531
531
+
"primaryKey": false,
532
532
+
"notNull": false
533
533
+
},
534
534
+
"access_type": {
535
535
+
"name": "access_type",
536
536
+
"type": "text",
537
537
+
"primaryKey": false,
538
538
+
"notNull": true
539
539
+
},
540
540
+
"card_count": {
541
541
+
"name": "card_count",
542
542
+
"type": "integer",
543
543
+
"primaryKey": false,
544
544
+
"notNull": true,
545
545
+
"default": 0
546
546
+
},
547
547
+
"created_at": {
548
548
+
"name": "created_at",
549
549
+
"type": "timestamp",
550
550
+
"primaryKey": false,
551
551
+
"notNull": true,
552
552
+
"default": "now()"
553
553
+
},
554
554
+
"updated_at": {
555
555
+
"name": "updated_at",
556
556
+
"type": "timestamp",
557
557
+
"primaryKey": false,
558
558
+
"notNull": true,
559
559
+
"default": "now()"
560
560
+
},
561
561
+
"published_record_id": {
562
562
+
"name": "published_record_id",
563
563
+
"type": "uuid",
564
564
+
"primaryKey": false,
565
565
+
"notNull": false
566
566
+
}
567
567
+
},
568
568
+
"indexes": {
569
569
+
"collections_author_id_idx": {
570
570
+
"name": "collections_author_id_idx",
571
571
+
"columns": [
572
572
+
{
573
573
+
"expression": "author_id",
574
574
+
"isExpression": false,
575
575
+
"asc": true,
576
576
+
"nulls": "last"
577
577
+
}
578
578
+
],
579
579
+
"isUnique": false,
580
580
+
"concurrently": false,
581
581
+
"method": "btree",
582
582
+
"with": {}
583
583
+
},
584
584
+
"collections_author_updated_at_idx": {
585
585
+
"name": "collections_author_updated_at_idx",
586
586
+
"columns": [
587
587
+
{
588
588
+
"expression": "author_id",
589
589
+
"isExpression": false,
590
590
+
"asc": true,
591
591
+
"nulls": "last"
592
592
+
},
593
593
+
{
594
594
+
"expression": "updated_at",
595
595
+
"isExpression": false,
596
596
+
"asc": true,
597
597
+
"nulls": "last"
598
598
+
}
599
599
+
],
600
600
+
"isUnique": false,
601
601
+
"concurrently": false,
602
602
+
"method": "btree",
603
603
+
"with": {}
604
604
+
}
605
605
+
},
606
606
+
"foreignKeys": {
607
607
+
"collections_published_record_id_published_records_id_fk": {
608
608
+
"name": "collections_published_record_id_published_records_id_fk",
609
609
+
"tableFrom": "collections",
610
610
+
"tableTo": "published_records",
611
611
+
"columnsFrom": ["published_record_id"],
612
612
+
"columnsTo": ["id"],
613
613
+
"onDelete": "no action",
614
614
+
"onUpdate": "no action"
615
615
+
}
616
616
+
},
617
617
+
"compositePrimaryKeys": {},
618
618
+
"uniqueConstraints": {},
619
619
+
"policies": {},
620
620
+
"checkConstraints": {},
621
621
+
"isRLSEnabled": false
622
622
+
},
623
623
+
"public.connections": {
624
624
+
"name": "connections",
625
625
+
"schema": "",
626
626
+
"columns": {
627
627
+
"id": {
628
628
+
"name": "id",
629
629
+
"type": "uuid",
630
630
+
"primaryKey": true,
631
631
+
"notNull": true
632
632
+
},
633
633
+
"curator_id": {
634
634
+
"name": "curator_id",
635
635
+
"type": "text",
636
636
+
"primaryKey": false,
637
637
+
"notNull": true
638
638
+
},
639
639
+
"source_type": {
640
640
+
"name": "source_type",
641
641
+
"type": "text",
642
642
+
"primaryKey": false,
643
643
+
"notNull": true
644
644
+
},
645
645
+
"source_value": {
646
646
+
"name": "source_value",
647
647
+
"type": "text",
648
648
+
"primaryKey": false,
649
649
+
"notNull": true
650
650
+
},
651
651
+
"target_type": {
652
652
+
"name": "target_type",
653
653
+
"type": "text",
654
654
+
"primaryKey": false,
655
655
+
"notNull": true
656
656
+
},
657
657
+
"target_value": {
658
658
+
"name": "target_value",
659
659
+
"type": "text",
660
660
+
"primaryKey": false,
661
661
+
"notNull": true
662
662
+
},
663
663
+
"connection_type": {
664
664
+
"name": "connection_type",
665
665
+
"type": "text",
666
666
+
"primaryKey": false,
667
667
+
"notNull": false
668
668
+
},
669
669
+
"note": {
670
670
+
"name": "note",
671
671
+
"type": "text",
672
672
+
"primaryKey": false,
673
673
+
"notNull": false
674
674
+
},
675
675
+
"published_record_id": {
676
676
+
"name": "published_record_id",
677
677
+
"type": "uuid",
678
678
+
"primaryKey": false,
679
679
+
"notNull": false
680
680
+
},
681
681
+
"created_at": {
682
682
+
"name": "created_at",
683
683
+
"type": "timestamp",
684
684
+
"primaryKey": false,
685
685
+
"notNull": true,
686
686
+
"default": "now()"
687
687
+
},
688
688
+
"updated_at": {
689
689
+
"name": "updated_at",
690
690
+
"type": "timestamp",
691
691
+
"primaryKey": false,
692
692
+
"notNull": true,
693
693
+
"default": "now()"
694
694
+
}
695
695
+
},
696
696
+
"indexes": {
697
697
+
"connections_curator_id_idx": {
698
698
+
"name": "connections_curator_id_idx",
699
699
+
"columns": [
700
700
+
{
701
701
+
"expression": "curator_id",
702
702
+
"isExpression": false,
703
703
+
"asc": true,
704
704
+
"nulls": "last"
705
705
+
}
706
706
+
],
707
707
+
"isUnique": false,
708
708
+
"concurrently": false,
709
709
+
"method": "btree",
710
710
+
"with": {}
711
711
+
},
712
712
+
"connections_source_idx": {
713
713
+
"name": "connections_source_idx",
714
714
+
"columns": [
715
715
+
{
716
716
+
"expression": "source_type",
717
717
+
"isExpression": false,
718
718
+
"asc": true,
719
719
+
"nulls": "last"
720
720
+
},
721
721
+
{
722
722
+
"expression": "source_value",
723
723
+
"isExpression": false,
724
724
+
"asc": true,
725
725
+
"nulls": "last"
726
726
+
}
727
727
+
],
728
728
+
"isUnique": false,
729
729
+
"concurrently": false,
730
730
+
"method": "btree",
731
731
+
"with": {}
732
732
+
},
733
733
+
"connections_target_idx": {
734
734
+
"name": "connections_target_idx",
735
735
+
"columns": [
736
736
+
{
737
737
+
"expression": "target_type",
738
738
+
"isExpression": false,
739
739
+
"asc": true,
740
740
+
"nulls": "last"
741
741
+
},
742
742
+
{
743
743
+
"expression": "target_value",
744
744
+
"isExpression": false,
745
745
+
"asc": true,
746
746
+
"nulls": "last"
747
747
+
}
748
748
+
],
749
749
+
"isUnique": false,
750
750
+
"concurrently": false,
751
751
+
"method": "btree",
752
752
+
"with": {}
753
753
+
},
754
754
+
"connections_created_at_idx": {
755
755
+
"name": "connections_created_at_idx",
756
756
+
"columns": [
757
757
+
{
758
758
+
"expression": "created_at",
759
759
+
"isExpression": false,
760
760
+
"asc": false,
761
761
+
"nulls": "last"
762
762
+
}
763
763
+
],
764
764
+
"isUnique": false,
765
765
+
"concurrently": false,
766
766
+
"method": "btree",
767
767
+
"with": {}
768
768
+
},
769
769
+
"connections_curator_created_at_idx": {
770
770
+
"name": "connections_curator_created_at_idx",
771
771
+
"columns": [
772
772
+
{
773
773
+
"expression": "curator_id",
774
774
+
"isExpression": false,
775
775
+
"asc": true,
776
776
+
"nulls": "last"
777
777
+
},
778
778
+
{
779
779
+
"expression": "created_at",
780
780
+
"isExpression": false,
781
781
+
"asc": false,
782
782
+
"nulls": "last"
783
783
+
}
784
784
+
],
785
785
+
"isUnique": false,
786
786
+
"concurrently": false,
787
787
+
"method": "btree",
788
788
+
"with": {}
789
789
+
}
790
790
+
},
791
791
+
"foreignKeys": {
792
792
+
"connections_published_record_id_published_records_id_fk": {
793
793
+
"name": "connections_published_record_id_published_records_id_fk",
794
794
+
"tableFrom": "connections",
795
795
+
"tableTo": "published_records",
796
796
+
"columnsFrom": ["published_record_id"],
797
797
+
"columnsTo": ["id"],
798
798
+
"onDelete": "no action",
799
799
+
"onUpdate": "no action"
800
800
+
}
801
801
+
},
802
802
+
"compositePrimaryKeys": {},
803
803
+
"uniqueConstraints": {},
804
804
+
"policies": {},
805
805
+
"checkConstraints": {},
806
806
+
"isRLSEnabled": false
807
807
+
},
808
808
+
"public.library_memberships": {
809
809
+
"name": "library_memberships",
810
810
+
"schema": "",
811
811
+
"columns": {
812
812
+
"card_id": {
813
813
+
"name": "card_id",
814
814
+
"type": "uuid",
815
815
+
"primaryKey": false,
816
816
+
"notNull": true
817
817
+
},
818
818
+
"user_id": {
819
819
+
"name": "user_id",
820
820
+
"type": "text",
821
821
+
"primaryKey": false,
822
822
+
"notNull": true
823
823
+
},
824
824
+
"added_at": {
825
825
+
"name": "added_at",
826
826
+
"type": "timestamp",
827
827
+
"primaryKey": false,
828
828
+
"notNull": true,
829
829
+
"default": "now()"
830
830
+
},
831
831
+
"published_record_id": {
832
832
+
"name": "published_record_id",
833
833
+
"type": "uuid",
834
834
+
"primaryKey": false,
835
835
+
"notNull": false
836
836
+
}
837
837
+
},
838
838
+
"indexes": {
839
839
+
"idx_user_cards": {
840
840
+
"name": "idx_user_cards",
841
841
+
"columns": [
842
842
+
{
843
843
+
"expression": "user_id",
844
844
+
"isExpression": false,
845
845
+
"asc": true,
846
846
+
"nulls": "last"
847
847
+
}
848
848
+
],
849
849
+
"isUnique": false,
850
850
+
"concurrently": false,
851
851
+
"method": "btree",
852
852
+
"with": {}
853
853
+
},
854
854
+
"idx_card_users": {
855
855
+
"name": "idx_card_users",
856
856
+
"columns": [
857
857
+
{
858
858
+
"expression": "card_id",
859
859
+
"isExpression": false,
860
860
+
"asc": true,
861
861
+
"nulls": "last"
862
862
+
}
863
863
+
],
864
864
+
"isUnique": false,
865
865
+
"concurrently": false,
866
866
+
"method": "btree",
867
867
+
"with": {}
868
868
+
},
869
869
+
"idx_library_memberships_user_type_covering": {
870
870
+
"name": "idx_library_memberships_user_type_covering",
871
871
+
"columns": [
872
872
+
{
873
873
+
"expression": "user_id",
874
874
+
"isExpression": false,
875
875
+
"asc": true,
876
876
+
"nulls": "last"
877
877
+
},
878
878
+
{
879
879
+
"expression": "added_at",
880
880
+
"isExpression": false,
881
881
+
"asc": false,
882
882
+
"nulls": "last"
883
883
+
}
884
884
+
],
885
885
+
"isUnique": false,
886
886
+
"concurrently": false,
887
887
+
"method": "btree",
888
888
+
"with": {}
889
889
+
}
890
890
+
},
891
891
+
"foreignKeys": {
892
892
+
"library_memberships_card_id_cards_id_fk": {
893
893
+
"name": "library_memberships_card_id_cards_id_fk",
894
894
+
"tableFrom": "library_memberships",
895
895
+
"tableTo": "cards",
896
896
+
"columnsFrom": ["card_id"],
897
897
+
"columnsTo": ["id"],
898
898
+
"onDelete": "cascade",
899
899
+
"onUpdate": "no action"
900
900
+
},
901
901
+
"library_memberships_published_record_id_published_records_id_fk": {
902
902
+
"name": "library_memberships_published_record_id_published_records_id_fk",
903
903
+
"tableFrom": "library_memberships",
904
904
+
"tableTo": "published_records",
905
905
+
"columnsFrom": ["published_record_id"],
906
906
+
"columnsTo": ["id"],
907
907
+
"onDelete": "no action",
908
908
+
"onUpdate": "no action"
909
909
+
}
910
910
+
},
911
911
+
"compositePrimaryKeys": {
912
912
+
"library_memberships_card_id_user_id_pk": {
913
913
+
"name": "library_memberships_card_id_user_id_pk",
914
914
+
"columns": ["card_id", "user_id"]
915
915
+
}
916
916
+
},
917
917
+
"uniqueConstraints": {},
918
918
+
"policies": {},
919
919
+
"checkConstraints": {},
920
920
+
"isRLSEnabled": false
921
921
+
},
922
922
+
"public.published_records": {
923
923
+
"name": "published_records",
924
924
+
"schema": "",
925
925
+
"columns": {
926
926
+
"id": {
927
927
+
"name": "id",
928
928
+
"type": "uuid",
929
929
+
"primaryKey": true,
930
930
+
"notNull": true
931
931
+
},
932
932
+
"uri": {
933
933
+
"name": "uri",
934
934
+
"type": "text",
935
935
+
"primaryKey": false,
936
936
+
"notNull": true
937
937
+
},
938
938
+
"cid": {
939
939
+
"name": "cid",
940
940
+
"type": "text",
941
941
+
"primaryKey": false,
942
942
+
"notNull": true
943
943
+
},
944
944
+
"recorded_at": {
945
945
+
"name": "recorded_at",
946
946
+
"type": "timestamp",
947
947
+
"primaryKey": false,
948
948
+
"notNull": true,
949
949
+
"default": "now()"
950
950
+
}
951
951
+
},
952
952
+
"indexes": {
953
953
+
"uri_cid_unique_idx": {
954
954
+
"name": "uri_cid_unique_idx",
955
955
+
"columns": [
956
956
+
{
957
957
+
"expression": "uri",
958
958
+
"isExpression": false,
959
959
+
"asc": true,
960
960
+
"nulls": "last"
961
961
+
},
962
962
+
{
963
963
+
"expression": "cid",
964
964
+
"isExpression": false,
965
965
+
"asc": true,
966
966
+
"nulls": "last"
967
967
+
}
968
968
+
],
969
969
+
"isUnique": true,
970
970
+
"concurrently": false,
971
971
+
"method": "btree",
972
972
+
"with": {}
973
973
+
},
974
974
+
"published_records_uri_idx": {
975
975
+
"name": "published_records_uri_idx",
976
976
+
"columns": [
977
977
+
{
978
978
+
"expression": "uri",
979
979
+
"isExpression": false,
980
980
+
"asc": true,
981
981
+
"nulls": "last"
982
982
+
}
983
983
+
],
984
984
+
"isUnique": false,
985
985
+
"concurrently": false,
986
986
+
"method": "btree",
987
987
+
"with": {}
988
988
+
}
989
989
+
},
990
990
+
"foreignKeys": {},
991
991
+
"compositePrimaryKeys": {},
992
992
+
"uniqueConstraints": {},
993
993
+
"policies": {},
994
994
+
"checkConstraints": {},
995
995
+
"isRLSEnabled": false
996
996
+
},
997
997
+
"public.feed_activities": {
998
998
+
"name": "feed_activities",
999
999
+
"schema": "",
1000
1000
+
"columns": {
1001
1001
+
"id": {
1002
1002
+
"name": "id",
1003
1003
+
"type": "uuid",
1004
1004
+
"primaryKey": true,
1005
1005
+
"notNull": true
1006
1006
+
},
1007
1007
+
"actor_id": {
1008
1008
+
"name": "actor_id",
1009
1009
+
"type": "text",
1010
1010
+
"primaryKey": false,
1011
1011
+
"notNull": true
1012
1012
+
},
1013
1013
+
"card_id": {
1014
1014
+
"name": "card_id",
1015
1015
+
"type": "text",
1016
1016
+
"primaryKey": false,
1017
1017
+
"notNull": false
1018
1018
+
},
1019
1019
+
"type": {
1020
1020
+
"name": "type",
1021
1021
+
"type": "text",
1022
1022
+
"primaryKey": false,
1023
1023
+
"notNull": true
1024
1024
+
},
1025
1025
+
"metadata": {
1026
1026
+
"name": "metadata",
1027
1027
+
"type": "jsonb",
1028
1028
+
"primaryKey": false,
1029
1029
+
"notNull": true
1030
1030
+
},
1031
1031
+
"url_type": {
1032
1032
+
"name": "url_type",
1033
1033
+
"type": "text",
1034
1034
+
"primaryKey": false,
1035
1035
+
"notNull": false
1036
1036
+
},
1037
1037
+
"source": {
1038
1038
+
"name": "source",
1039
1039
+
"type": "text",
1040
1040
+
"primaryKey": false,
1041
1041
+
"notNull": false
1042
1042
+
},
1043
1043
+
"created_at": {
1044
1044
+
"name": "created_at",
1045
1045
+
"type": "timestamp",
1046
1046
+
"primaryKey": false,
1047
1047
+
"notNull": true,
1048
1048
+
"default": "now()"
1049
1049
+
}
1050
1050
+
},
1051
1051
+
"indexes": {
1052
1052
+
"feed_activities_type_idx": {
1053
1053
+
"name": "feed_activities_type_idx",
1054
1054
+
"columns": [
1055
1055
+
{
1056
1056
+
"expression": "type",
1057
1057
+
"isExpression": false,
1058
1058
+
"asc": true,
1059
1059
+
"nulls": "last"
1060
1060
+
}
1061
1061
+
],
1062
1062
+
"isUnique": false,
1063
1063
+
"concurrently": false,
1064
1064
+
"method": "btree",
1065
1065
+
"with": {}
1066
1066
+
},
1067
1067
+
"feed_activities_url_type_idx": {
1068
1068
+
"name": "feed_activities_url_type_idx",
1069
1069
+
"columns": [
1070
1070
+
{
1071
1071
+
"expression": "url_type",
1072
1072
+
"isExpression": false,
1073
1073
+
"asc": true,
1074
1074
+
"nulls": "last"
1075
1075
+
}
1076
1076
+
],
1077
1077
+
"isUnique": false,
1078
1078
+
"concurrently": false,
1079
1079
+
"method": "btree",
1080
1080
+
"with": {}
1081
1081
+
},
1082
1082
+
"feed_activities_created_at_idx": {
1083
1083
+
"name": "feed_activities_created_at_idx",
1084
1084
+
"columns": [
1085
1085
+
{
1086
1086
+
"expression": "created_at",
1087
1087
+
"isExpression": false,
1088
1088
+
"asc": false,
1089
1089
+
"nulls": "last"
1090
1090
+
}
1091
1091
+
],
1092
1092
+
"isUnique": false,
1093
1093
+
"concurrently": false,
1094
1094
+
"method": "btree",
1095
1095
+
"with": {}
1096
1096
+
},
1097
1097
+
"feed_activities_type_created_at_idx": {
1098
1098
+
"name": "feed_activities_type_created_at_idx",
1099
1099
+
"columns": [
1100
1100
+
{
1101
1101
+
"expression": "type",
1102
1102
+
"isExpression": false,
1103
1103
+
"asc": true,
1104
1104
+
"nulls": "last"
1105
1105
+
},
1106
1106
+
{
1107
1107
+
"expression": "created_at",
1108
1108
+
"isExpression": false,
1109
1109
+
"asc": false,
1110
1110
+
"nulls": "last"
1111
1111
+
}
1112
1112
+
],
1113
1113
+
"isUnique": false,
1114
1114
+
"concurrently": false,
1115
1115
+
"method": "btree",
1116
1116
+
"with": {}
1117
1117
+
},
1118
1118
+
"feed_activities_url_type_created_at_idx": {
1119
1119
+
"name": "feed_activities_url_type_created_at_idx",
1120
1120
+
"columns": [
1121
1121
+
{
1122
1122
+
"expression": "url_type",
1123
1123
+
"isExpression": false,
1124
1124
+
"asc": true,
1125
1125
+
"nulls": "last"
1126
1126
+
},
1127
1127
+
{
1128
1128
+
"expression": "created_at",
1129
1129
+
"isExpression": false,
1130
1130
+
"asc": false,
1131
1131
+
"nulls": "last"
1132
1132
+
}
1133
1133
+
],
1134
1134
+
"isUnique": false,
1135
1135
+
"concurrently": false,
1136
1136
+
"method": "btree",
1137
1137
+
"with": {}
1138
1138
+
},
1139
1139
+
"feed_activities_type_url_type_created_at_idx": {
1140
1140
+
"name": "feed_activities_type_url_type_created_at_idx",
1141
1141
+
"columns": [
1142
1142
+
{
1143
1143
+
"expression": "type",
1144
1144
+
"isExpression": false,
1145
1145
+
"asc": true,
1146
1146
+
"nulls": "last"
1147
1147
+
},
1148
1148
+
{
1149
1149
+
"expression": "url_type",
1150
1150
+
"isExpression": false,
1151
1151
+
"asc": true,
1152
1152
+
"nulls": "last"
1153
1153
+
},
1154
1154
+
{
1155
1155
+
"expression": "created_at",
1156
1156
+
"isExpression": false,
1157
1157
+
"asc": false,
1158
1158
+
"nulls": "last"
1159
1159
+
}
1160
1160
+
],
1161
1161
+
"isUnique": false,
1162
1162
+
"concurrently": false,
1163
1163
+
"method": "btree",
1164
1164
+
"with": {}
1165
1165
+
},
1166
1166
+
"feed_activities_dedup_idx": {
1167
1167
+
"name": "feed_activities_dedup_idx",
1168
1168
+
"columns": [
1169
1169
+
{
1170
1170
+
"expression": "actor_id",
1171
1171
+
"isExpression": false,
1172
1172
+
"asc": true,
1173
1173
+
"nulls": "last"
1174
1174
+
},
1175
1175
+
{
1176
1176
+
"expression": "card_id",
1177
1177
+
"isExpression": false,
1178
1178
+
"asc": true,
1179
1179
+
"nulls": "last"
1180
1180
+
},
1181
1181
+
{
1182
1182
+
"expression": "created_at",
1183
1183
+
"isExpression": false,
1184
1184
+
"asc": false,
1185
1185
+
"nulls": "last"
1186
1186
+
}
1187
1187
+
],
1188
1188
+
"isUnique": false,
1189
1189
+
"concurrently": false,
1190
1190
+
"method": "btree",
1191
1191
+
"with": {}
1192
1192
+
},
1193
1193
+
"feed_activities_card_id_idx": {
1194
1194
+
"name": "feed_activities_card_id_idx",
1195
1195
+
"columns": [
1196
1196
+
{
1197
1197
+
"expression": "card_id",
1198
1198
+
"isExpression": false,
1199
1199
+
"asc": true,
1200
1200
+
"nulls": "last"
1201
1201
+
}
1202
1202
+
],
1203
1203
+
"isUnique": false,
1204
1204
+
"concurrently": false,
1205
1205
+
"method": "btree",
1206
1206
+
"with": {}
1207
1207
+
},
1208
1208
+
"feed_activities_source_idx": {
1209
1209
+
"name": "feed_activities_source_idx",
1210
1210
+
"columns": [
1211
1211
+
{
1212
1212
+
"expression": "source",
1213
1213
+
"isExpression": false,
1214
1214
+
"asc": true,
1215
1215
+
"nulls": "last"
1216
1216
+
}
1217
1217
+
],
1218
1218
+
"isUnique": false,
1219
1219
+
"concurrently": false,
1220
1220
+
"method": "btree",
1221
1221
+
"with": {}
1222
1222
+
}
1223
1223
+
},
1224
1224
+
"foreignKeys": {},
1225
1225
+
"compositePrimaryKeys": {},
1226
1226
+
"uniqueConstraints": {},
1227
1227
+
"policies": {},
1228
1228
+
"checkConstraints": {},
1229
1229
+
"isRLSEnabled": false
1230
1230
+
},
1231
1231
+
"public.following_feed_items": {
1232
1232
+
"name": "following_feed_items",
1233
1233
+
"schema": "",
1234
1234
+
"columns": {
1235
1235
+
"user_id": {
1236
1236
+
"name": "user_id",
1237
1237
+
"type": "text",
1238
1238
+
"primaryKey": false,
1239
1239
+
"notNull": true
1240
1240
+
},
1241
1241
+
"activity_id": {
1242
1242
+
"name": "activity_id",
1243
1243
+
"type": "uuid",
1244
1244
+
"primaryKey": false,
1245
1245
+
"notNull": true
1246
1246
+
},
1247
1247
+
"created_at": {
1248
1248
+
"name": "created_at",
1249
1249
+
"type": "timestamp",
1250
1250
+
"primaryKey": false,
1251
1251
+
"notNull": true
1252
1252
+
}
1253
1253
+
},
1254
1254
+
"indexes": {
1255
1255
+
"idx_following_feed_user_time": {
1256
1256
+
"name": "idx_following_feed_user_time",
1257
1257
+
"columns": [
1258
1258
+
{
1259
1259
+
"expression": "user_id",
1260
1260
+
"isExpression": false,
1261
1261
+
"asc": true,
1262
1262
+
"nulls": "last"
1263
1263
+
},
1264
1264
+
{
1265
1265
+
"expression": "created_at",
1266
1266
+
"isExpression": false,
1267
1267
+
"asc": false,
1268
1268
+
"nulls": "last"
1269
1269
+
}
1270
1270
+
],
1271
1271
+
"isUnique": false,
1272
1272
+
"concurrently": false,
1273
1273
+
"method": "btree",
1274
1274
+
"with": {}
1275
1275
+
}
1276
1276
+
},
1277
1277
+
"foreignKeys": {
1278
1278
+
"following_feed_items_activity_id_feed_activities_id_fk": {
1279
1279
+
"name": "following_feed_items_activity_id_feed_activities_id_fk",
1280
1280
+
"tableFrom": "following_feed_items",
1281
1281
+
"tableTo": "feed_activities",
1282
1282
+
"columnsFrom": ["activity_id"],
1283
1283
+
"columnsTo": ["id"],
1284
1284
+
"onDelete": "cascade",
1285
1285
+
"onUpdate": "no action"
1286
1286
+
}
1287
1287
+
},
1288
1288
+
"compositePrimaryKeys": {
1289
1289
+
"following_feed_items_user_id_activity_id_pk": {
1290
1290
+
"name": "following_feed_items_user_id_activity_id_pk",
1291
1291
+
"columns": ["user_id", "activity_id"]
1292
1292
+
}
1293
1293
+
},
1294
1294
+
"uniqueConstraints": {},
1295
1295
+
"policies": {},
1296
1296
+
"checkConstraints": {},
1297
1297
+
"isRLSEnabled": false
1298
1298
+
},
1299
1299
+
"public.notifications": {
1300
1300
+
"name": "notifications",
1301
1301
+
"schema": "",
1302
1302
+
"columns": {
1303
1303
+
"id": {
1304
1304
+
"name": "id",
1305
1305
+
"type": "uuid",
1306
1306
+
"primaryKey": true,
1307
1307
+
"notNull": true
1308
1308
+
},
1309
1309
+
"recipient_user_id": {
1310
1310
+
"name": "recipient_user_id",
1311
1311
+
"type": "text",
1312
1312
+
"primaryKey": false,
1313
1313
+
"notNull": true
1314
1314
+
},
1315
1315
+
"actor_user_id": {
1316
1316
+
"name": "actor_user_id",
1317
1317
+
"type": "text",
1318
1318
+
"primaryKey": false,
1319
1319
+
"notNull": true
1320
1320
+
},
1321
1321
+
"type": {
1322
1322
+
"name": "type",
1323
1323
+
"type": "text",
1324
1324
+
"primaryKey": false,
1325
1325
+
"notNull": true
1326
1326
+
},
1327
1327
+
"metadata": {
1328
1328
+
"name": "metadata",
1329
1329
+
"type": "jsonb",
1330
1330
+
"primaryKey": false,
1331
1331
+
"notNull": true
1332
1332
+
},
1333
1333
+
"read": {
1334
1334
+
"name": "read",
1335
1335
+
"type": "boolean",
1336
1336
+
"primaryKey": false,
1337
1337
+
"notNull": true,
1338
1338
+
"default": false
1339
1339
+
},
1340
1340
+
"created_at": {
1341
1341
+
"name": "created_at",
1342
1342
+
"type": "timestamp",
1343
1343
+
"primaryKey": false,
1344
1344
+
"notNull": true,
1345
1345
+
"default": "now()"
1346
1346
+
},
1347
1347
+
"updated_at": {
1348
1348
+
"name": "updated_at",
1349
1349
+
"type": "timestamp",
1350
1350
+
"primaryKey": false,
1351
1351
+
"notNull": true,
1352
1352
+
"default": "now()"
1353
1353
+
}
1354
1354
+
},
1355
1355
+
"indexes": {
1356
1356
+
"notifications_recipient_idx": {
1357
1357
+
"name": "notifications_recipient_idx",
1358
1358
+
"columns": [
1359
1359
+
{
1360
1360
+
"expression": "recipient_user_id",
1361
1361
+
"isExpression": false,
1362
1362
+
"asc": true,
1363
1363
+
"nulls": "last"
1364
1364
+
}
1365
1365
+
],
1366
1366
+
"isUnique": false,
1367
1367
+
"concurrently": false,
1368
1368
+
"method": "btree",
1369
1369
+
"with": {}
1370
1370
+
},
1371
1371
+
"notifications_recipient_created_at_idx": {
1372
1372
+
"name": "notifications_recipient_created_at_idx",
1373
1373
+
"columns": [
1374
1374
+
{
1375
1375
+
"expression": "recipient_user_id",
1376
1376
+
"isExpression": false,
1377
1377
+
"asc": true,
1378
1378
+
"nulls": "last"
1379
1379
+
},
1380
1380
+
{
1381
1381
+
"expression": "created_at",
1382
1382
+
"isExpression": false,
1383
1383
+
"asc": false,
1384
1384
+
"nulls": "last"
1385
1385
+
}
1386
1386
+
],
1387
1387
+
"isUnique": false,
1388
1388
+
"concurrently": false,
1389
1389
+
"method": "btree",
1390
1390
+
"with": {}
1391
1391
+
},
1392
1392
+
"notifications_recipient_read_idx": {
1393
1393
+
"name": "notifications_recipient_read_idx",
1394
1394
+
"columns": [
1395
1395
+
{
1396
1396
+
"expression": "recipient_user_id",
1397
1397
+
"isExpression": false,
1398
1398
+
"asc": true,
1399
1399
+
"nulls": "last"
1400
1400
+
},
1401
1401
+
{
1402
1402
+
"expression": "read",
1403
1403
+
"isExpression": false,
1404
1404
+
"asc": true,
1405
1405
+
"nulls": "last"
1406
1406
+
}
1407
1407
+
],
1408
1408
+
"isUnique": false,
1409
1409
+
"concurrently": false,
1410
1410
+
"method": "btree",
1411
1411
+
"with": {}
1412
1412
+
}
1413
1413
+
},
1414
1414
+
"foreignKeys": {},
1415
1415
+
"compositePrimaryKeys": {},
1416
1416
+
"uniqueConstraints": {},
1417
1417
+
"policies": {},
1418
1418
+
"checkConstraints": {},
1419
1419
+
"isRLSEnabled": false
1420
1420
+
},
1421
1421
+
"public.sync_statuses": {
1422
1422
+
"name": "sync_statuses",
1423
1423
+
"schema": "",
1424
1424
+
"columns": {
1425
1425
+
"id": {
1426
1426
+
"name": "id",
1427
1427
+
"type": "uuid",
1428
1428
+
"primaryKey": true,
1429
1429
+
"notNull": true,
1430
1430
+
"default": "gen_random_uuid()"
1431
1431
+
},
1432
1432
+
"curator_id": {
1433
1433
+
"name": "curator_id",
1434
1434
+
"type": "text",
1435
1435
+
"primaryKey": false,
1436
1436
+
"notNull": true
1437
1437
+
},
1438
1438
+
"sync_state": {
1439
1439
+
"name": "sync_state",
1440
1440
+
"type": "text",
1441
1441
+
"primaryKey": false,
1442
1442
+
"notNull": true
1443
1443
+
},
1444
1444
+
"last_synced_at": {
1445
1445
+
"name": "last_synced_at",
1446
1446
+
"type": "timestamp",
1447
1447
+
"primaryKey": false,
1448
1448
+
"notNull": false
1449
1449
+
},
1450
1450
+
"last_sync_attempt_at": {
1451
1451
+
"name": "last_sync_attempt_at",
1452
1452
+
"type": "timestamp",
1453
1453
+
"primaryKey": false,
1454
1454
+
"notNull": false
1455
1455
+
},
1456
1456
+
"sync_error_message": {
1457
1457
+
"name": "sync_error_message",
1458
1458
+
"type": "text",
1459
1459
+
"primaryKey": false,
1460
1460
+
"notNull": false
1461
1461
+
},
1462
1462
+
"records_processed": {
1463
1463
+
"name": "records_processed",
1464
1464
+
"type": "integer",
1465
1465
+
"primaryKey": false,
1466
1466
+
"notNull": false
1467
1467
+
},
1468
1468
+
"created_at": {
1469
1469
+
"name": "created_at",
1470
1470
+
"type": "timestamp",
1471
1471
+
"primaryKey": false,
1472
1472
+
"notNull": true,
1473
1473
+
"default": "now()"
1474
1474
+
},
1475
1475
+
"updated_at": {
1476
1476
+
"name": "updated_at",
1477
1477
+
"type": "timestamp",
1478
1478
+
"primaryKey": false,
1479
1479
+
"notNull": true,
1480
1480
+
"default": "now()"
1481
1481
+
}
1482
1482
+
},
1483
1483
+
"indexes": {},
1484
1484
+
"foreignKeys": {},
1485
1485
+
"compositePrimaryKeys": {},
1486
1486
+
"uniqueConstraints": {
1487
1487
+
"sync_statuses_curator_id_unique": {
1488
1488
+
"name": "sync_statuses_curator_id_unique",
1489
1489
+
"nullsNotDistinct": false,
1490
1490
+
"columns": ["curator_id"]
1491
1491
+
}
1492
1492
+
},
1493
1493
+
"policies": {},
1494
1494
+
"checkConstraints": {},
1495
1495
+
"isRLSEnabled": false
1496
1496
+
},
1497
1497
+
"public.auth_session": {
1498
1498
+
"name": "auth_session",
1499
1499
+
"schema": "",
1500
1500
+
"columns": {
1501
1501
+
"key": {
1502
1502
+
"name": "key",
1503
1503
+
"type": "text",
1504
1504
+
"primaryKey": true,
1505
1505
+
"notNull": true
1506
1506
+
},
1507
1507
+
"session": {
1508
1508
+
"name": "session",
1509
1509
+
"type": "text",
1510
1510
+
"primaryKey": false,
1511
1511
+
"notNull": true
1512
1512
+
}
1513
1513
+
},
1514
1514
+
"indexes": {},
1515
1515
+
"foreignKeys": {},
1516
1516
+
"compositePrimaryKeys": {},
1517
1517
+
"uniqueConstraints": {},
1518
1518
+
"policies": {},
1519
1519
+
"checkConstraints": {},
1520
1520
+
"isRLSEnabled": false
1521
1521
+
},
1522
1522
+
"public.auth_state": {
1523
1523
+
"name": "auth_state",
1524
1524
+
"schema": "",
1525
1525
+
"columns": {
1526
1526
+
"key": {
1527
1527
+
"name": "key",
1528
1528
+
"type": "text",
1529
1529
+
"primaryKey": true,
1530
1530
+
"notNull": true
1531
1531
+
},
1532
1532
+
"state": {
1533
1533
+
"name": "state",
1534
1534
+
"type": "text",
1535
1535
+
"primaryKey": false,
1536
1536
+
"notNull": true
1537
1537
+
},
1538
1538
+
"created_at": {
1539
1539
+
"name": "created_at",
1540
1540
+
"type": "timestamp",
1541
1541
+
"primaryKey": false,
1542
1542
+
"notNull": false,
1543
1543
+
"default": "now()"
1544
1544
+
}
1545
1545
+
},
1546
1546
+
"indexes": {},
1547
1547
+
"foreignKeys": {},
1548
1548
+
"compositePrimaryKeys": {},
1549
1549
+
"uniqueConstraints": {},
1550
1550
+
"policies": {},
1551
1551
+
"checkConstraints": {},
1552
1552
+
"isRLSEnabled": false
1553
1553
+
},
1554
1554
+
"public.auth_refresh_tokens": {
1555
1555
+
"name": "auth_refresh_tokens",
1556
1556
+
"schema": "",
1557
1557
+
"columns": {
1558
1558
+
"token_id": {
1559
1559
+
"name": "token_id",
1560
1560
+
"type": "text",
1561
1561
+
"primaryKey": true,
1562
1562
+
"notNull": true
1563
1563
+
},
1564
1564
+
"user_did": {
1565
1565
+
"name": "user_did",
1566
1566
+
"type": "text",
1567
1567
+
"primaryKey": false,
1568
1568
+
"notNull": true
1569
1569
+
},
1570
1570
+
"refresh_token": {
1571
1571
+
"name": "refresh_token",
1572
1572
+
"type": "text",
1573
1573
+
"primaryKey": false,
1574
1574
+
"notNull": true
1575
1575
+
},
1576
1576
+
"issued_at": {
1577
1577
+
"name": "issued_at",
1578
1578
+
"type": "timestamp",
1579
1579
+
"primaryKey": false,
1580
1580
+
"notNull": true
1581
1581
+
},
1582
1582
+
"expires_at": {
1583
1583
+
"name": "expires_at",
1584
1584
+
"type": "timestamp",
1585
1585
+
"primaryKey": false,
1586
1586
+
"notNull": true
1587
1587
+
},
1588
1588
+
"revoked": {
1589
1589
+
"name": "revoked",
1590
1590
+
"type": "boolean",
1591
1591
+
"primaryKey": false,
1592
1592
+
"notNull": false,
1593
1593
+
"default": false
1594
1594
+
}
1595
1595
+
},
1596
1596
+
"indexes": {},
1597
1597
+
"foreignKeys": {
1598
1598
+
"auth_refresh_tokens_user_did_users_id_fk": {
1599
1599
+
"name": "auth_refresh_tokens_user_did_users_id_fk",
1600
1600
+
"tableFrom": "auth_refresh_tokens",
1601
1601
+
"tableTo": "users",
1602
1602
+
"columnsFrom": ["user_did"],
1603
1603
+
"columnsTo": ["id"],
1604
1604
+
"onDelete": "no action",
1605
1605
+
"onUpdate": "no action"
1606
1606
+
}
1607
1607
+
},
1608
1608
+
"compositePrimaryKeys": {},
1609
1609
+
"uniqueConstraints": {},
1610
1610
+
"policies": {},
1611
1611
+
"checkConstraints": {},
1612
1612
+
"isRLSEnabled": false
1613
1613
+
},
1614
1614
+
"public.follows": {
1615
1615
+
"name": "follows",
1616
1616
+
"schema": "",
1617
1617
+
"columns": {
1618
1618
+
"follower_id": {
1619
1619
+
"name": "follower_id",
1620
1620
+
"type": "text",
1621
1621
+
"primaryKey": false,
1622
1622
+
"notNull": true
1623
1623
+
},
1624
1624
+
"target_id": {
1625
1625
+
"name": "target_id",
1626
1626
+
"type": "text",
1627
1627
+
"primaryKey": false,
1628
1628
+
"notNull": true
1629
1629
+
},
1630
1630
+
"target_type": {
1631
1631
+
"name": "target_type",
1632
1632
+
"type": "text",
1633
1633
+
"primaryKey": false,
1634
1634
+
"notNull": true
1635
1635
+
},
1636
1636
+
"published_record_id": {
1637
1637
+
"name": "published_record_id",
1638
1638
+
"type": "uuid",
1639
1639
+
"primaryKey": false,
1640
1640
+
"notNull": false
1641
1641
+
},
1642
1642
+
"created_at": {
1643
1643
+
"name": "created_at",
1644
1644
+
"type": "timestamp",
1645
1645
+
"primaryKey": false,
1646
1646
+
"notNull": true,
1647
1647
+
"default": "now()"
1648
1648
+
}
1649
1649
+
},
1650
1650
+
"indexes": {
1651
1651
+
"idx_follows_follower": {
1652
1652
+
"name": "idx_follows_follower",
1653
1653
+
"columns": [
1654
1654
+
{
1655
1655
+
"expression": "follower_id",
1656
1656
+
"isExpression": false,
1657
1657
+
"asc": true,
1658
1658
+
"nulls": "last"
1659
1659
+
}
1660
1660
+
],
1661
1661
+
"isUnique": false,
1662
1662
+
"concurrently": false,
1663
1663
+
"method": "btree",
1664
1664
+
"with": {}
1665
1665
+
},
1666
1666
+
"idx_follows_target": {
1667
1667
+
"name": "idx_follows_target",
1668
1668
+
"columns": [
1669
1669
+
{
1670
1670
+
"expression": "target_id",
1671
1671
+
"isExpression": false,
1672
1672
+
"asc": true,
1673
1673
+
"nulls": "last"
1674
1674
+
},
1675
1675
+
{
1676
1676
+
"expression": "target_type",
1677
1677
+
"isExpression": false,
1678
1678
+
"asc": true,
1679
1679
+
"nulls": "last"
1680
1680
+
}
1681
1681
+
],
1682
1682
+
"isUnique": false,
1683
1683
+
"concurrently": false,
1684
1684
+
"method": "btree",
1685
1685
+
"with": {}
1686
1686
+
}
1687
1687
+
},
1688
1688
+
"foreignKeys": {
1689
1689
+
"follows_published_record_id_published_records_id_fk": {
1690
1690
+
"name": "follows_published_record_id_published_records_id_fk",
1691
1691
+
"tableFrom": "follows",
1692
1692
+
"tableTo": "published_records",
1693
1693
+
"columnsFrom": ["published_record_id"],
1694
1694
+
"columnsTo": ["id"],
1695
1695
+
"onDelete": "no action",
1696
1696
+
"onUpdate": "no action"
1697
1697
+
}
1698
1698
+
},
1699
1699
+
"compositePrimaryKeys": {
1700
1700
+
"follows_follower_id_target_id_target_type_pk": {
1701
1701
+
"name": "follows_follower_id_target_id_target_type_pk",
1702
1702
+
"columns": ["follower_id", "target_id", "target_type"]
1703
1703
+
}
1704
1704
+
},
1705
1705
+
"uniqueConstraints": {},
1706
1706
+
"policies": {},
1707
1707
+
"checkConstraints": {},
1708
1708
+
"isRLSEnabled": false
1709
1709
+
},
1710
1710
+
"public.users": {
1711
1711
+
"name": "users",
1712
1712
+
"schema": "",
1713
1713
+
"columns": {
1714
1714
+
"id": {
1715
1715
+
"name": "id",
1716
1716
+
"type": "text",
1717
1717
+
"primaryKey": true,
1718
1718
+
"notNull": true
1719
1719
+
},
1720
1720
+
"handle": {
1721
1721
+
"name": "handle",
1722
1722
+
"type": "text",
1723
1723
+
"primaryKey": false,
1724
1724
+
"notNull": false
1725
1725
+
},
1726
1726
+
"linked_at": {
1727
1727
+
"name": "linked_at",
1728
1728
+
"type": "timestamp",
1729
1729
+
"primaryKey": false,
1730
1730
+
"notNull": true
1731
1731
+
},
1732
1732
+
"last_login_at": {
1733
1733
+
"name": "last_login_at",
1734
1734
+
"type": "timestamp",
1735
1735
+
"primaryKey": false,
1736
1736
+
"notNull": true
1737
1737
+
}
1738
1738
+
},
1739
1739
+
"indexes": {},
1740
1740
+
"foreignKeys": {},
1741
1741
+
"compositePrimaryKeys": {},
1742
1742
+
"uniqueConstraints": {},
1743
1743
+
"policies": {},
1744
1744
+
"checkConstraints": {},
1745
1745
+
"isRLSEnabled": false
1746
1746
+
}
1747
1747
+
},
1748
1748
+
"enums": {},
1749
1749
+
"schemas": {},
1750
1750
+
"sequences": {},
1751
1751
+
"roles": {},
1752
1752
+
"policies": {},
1753
1753
+
"views": {},
1754
1754
+
"_meta": {
1755
1755
+
"columns": {},
1756
1756
+
"schemas": {},
1757
1757
+
"tables": {}
1758
1758
+
}
1759
1759
+
}
···
127
127
"when": 1770860659903,
128
128
"tag": "0017_heavy_inertia",
129
129
"breakpoints": true
130
130
+
},
131
131
+
{
132
132
+
"idx": 18,
133
133
+
"version": "7",
134
134
+
"when": 1772242800899,
135
135
+
"tag": "0018_classy_changeling",
136
136
+
"breakpoints": true
130
137
}
131
138
]
132
139
}