tangled
alpha
login
or
join now
cosmik.network
/
semble
43
fork
atom
A social knowledge tool for researchers built on ATProto
43
fork
atom
overview
issues
13
pulls
pipelines
add custom migration to clear db
Wesley Finck
5 months ago
a44c306c
c68e40fd
+784
3 changed files
expand all
collapse all
unified
split
src
shared
infrastructure
database
migrations
0005_truncate-tables.sql
meta
0005_snapshot.json
_journal.json
+10
src/shared/infrastructure/database/migrations/0005_truncate-tables.sql
···
1
1
+
-- Custom SQL migration file, put your code below! --
2
2
+
-- Truncate all tables to wipe data but keep table structure
3
3
+
-- CASCADE ensures foreign key constraints don't prevent truncation
4
4
+
TRUNCATE TABLE "collection_cards",
5
5
+
"collection_collaborators",
6
6
+
"library_memberships",
7
7
+
"collections",
8
8
+
"cards",
9
9
+
"published_records",
10
10
+
"feed_activities" CASCADE;
+767
src/shared/infrastructure/database/migrations/meta/0005_snapshot.json
···
1
1
+
{
2
2
+
"id": "2d3157fe-869f-46ed-bcdc-03fc757f16c1",
3
3
+
"prevId": "1e15b3e8-04ba-4e0a-965e-07142597ddc4",
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
+
"parent_card_id": {
87
87
+
"name": "parent_card_id",
88
88
+
"type": "uuid",
89
89
+
"primaryKey": false,
90
90
+
"notNull": false
91
91
+
},
92
92
+
"published_record_id": {
93
93
+
"name": "published_record_id",
94
94
+
"type": "uuid",
95
95
+
"primaryKey": false,
96
96
+
"notNull": false
97
97
+
},
98
98
+
"library_count": {
99
99
+
"name": "library_count",
100
100
+
"type": "integer",
101
101
+
"primaryKey": false,
102
102
+
"notNull": true,
103
103
+
"default": 0
104
104
+
},
105
105
+
"created_at": {
106
106
+
"name": "created_at",
107
107
+
"type": "timestamp",
108
108
+
"primaryKey": false,
109
109
+
"notNull": true,
110
110
+
"default": "now()"
111
111
+
},
112
112
+
"updated_at": {
113
113
+
"name": "updated_at",
114
114
+
"type": "timestamp",
115
115
+
"primaryKey": false,
116
116
+
"notNull": true,
117
117
+
"default": "now()"
118
118
+
}
119
119
+
},
120
120
+
"indexes": {},
121
121
+
"foreignKeys": {
122
122
+
"cards_parent_card_id_cards_id_fk": {
123
123
+
"name": "cards_parent_card_id_cards_id_fk",
124
124
+
"tableFrom": "cards",
125
125
+
"columnsFrom": [
126
126
+
"parent_card_id"
127
127
+
],
128
128
+
"tableTo": "cards",
129
129
+
"columnsTo": [
130
130
+
"id"
131
131
+
],
132
132
+
"onUpdate": "no action",
133
133
+
"onDelete": "no action"
134
134
+
},
135
135
+
"cards_published_record_id_published_records_id_fk": {
136
136
+
"name": "cards_published_record_id_published_records_id_fk",
137
137
+
"tableFrom": "cards",
138
138
+
"columnsFrom": [
139
139
+
"published_record_id"
140
140
+
],
141
141
+
"tableTo": "published_records",
142
142
+
"columnsTo": [
143
143
+
"id"
144
144
+
],
145
145
+
"onUpdate": "no action",
146
146
+
"onDelete": "no action"
147
147
+
}
148
148
+
},
149
149
+
"compositePrimaryKeys": {},
150
150
+
"uniqueConstraints": {},
151
151
+
"policies": {},
152
152
+
"checkConstraints": {},
153
153
+
"isRLSEnabled": false
154
154
+
},
155
155
+
"public.collection_cards": {
156
156
+
"name": "collection_cards",
157
157
+
"schema": "",
158
158
+
"columns": {
159
159
+
"id": {
160
160
+
"name": "id",
161
161
+
"type": "uuid",
162
162
+
"primaryKey": true,
163
163
+
"notNull": true
164
164
+
},
165
165
+
"collection_id": {
166
166
+
"name": "collection_id",
167
167
+
"type": "uuid",
168
168
+
"primaryKey": false,
169
169
+
"notNull": true
170
170
+
},
171
171
+
"card_id": {
172
172
+
"name": "card_id",
173
173
+
"type": "uuid",
174
174
+
"primaryKey": false,
175
175
+
"notNull": true
176
176
+
},
177
177
+
"added_by": {
178
178
+
"name": "added_by",
179
179
+
"type": "text",
180
180
+
"primaryKey": false,
181
181
+
"notNull": true
182
182
+
},
183
183
+
"added_at": {
184
184
+
"name": "added_at",
185
185
+
"type": "timestamp",
186
186
+
"primaryKey": false,
187
187
+
"notNull": true,
188
188
+
"default": "now()"
189
189
+
},
190
190
+
"published_record_id": {
191
191
+
"name": "published_record_id",
192
192
+
"type": "uuid",
193
193
+
"primaryKey": false,
194
194
+
"notNull": false
195
195
+
}
196
196
+
},
197
197
+
"indexes": {},
198
198
+
"foreignKeys": {
199
199
+
"collection_cards_collection_id_collections_id_fk": {
200
200
+
"name": "collection_cards_collection_id_collections_id_fk",
201
201
+
"tableFrom": "collection_cards",
202
202
+
"columnsFrom": [
203
203
+
"collection_id"
204
204
+
],
205
205
+
"tableTo": "collections",
206
206
+
"columnsTo": [
207
207
+
"id"
208
208
+
],
209
209
+
"onUpdate": "no action",
210
210
+
"onDelete": "cascade"
211
211
+
},
212
212
+
"collection_cards_card_id_cards_id_fk": {
213
213
+
"name": "collection_cards_card_id_cards_id_fk",
214
214
+
"tableFrom": "collection_cards",
215
215
+
"columnsFrom": [
216
216
+
"card_id"
217
217
+
],
218
218
+
"tableTo": "cards",
219
219
+
"columnsTo": [
220
220
+
"id"
221
221
+
],
222
222
+
"onUpdate": "no action",
223
223
+
"onDelete": "cascade"
224
224
+
},
225
225
+
"collection_cards_published_record_id_published_records_id_fk": {
226
226
+
"name": "collection_cards_published_record_id_published_records_id_fk",
227
227
+
"tableFrom": "collection_cards",
228
228
+
"columnsFrom": [
229
229
+
"published_record_id"
230
230
+
],
231
231
+
"tableTo": "published_records",
232
232
+
"columnsTo": [
233
233
+
"id"
234
234
+
],
235
235
+
"onUpdate": "no action",
236
236
+
"onDelete": "no action"
237
237
+
}
238
238
+
},
239
239
+
"compositePrimaryKeys": {},
240
240
+
"uniqueConstraints": {},
241
241
+
"policies": {},
242
242
+
"checkConstraints": {},
243
243
+
"isRLSEnabled": false
244
244
+
},
245
245
+
"public.collection_collaborators": {
246
246
+
"name": "collection_collaborators",
247
247
+
"schema": "",
248
248
+
"columns": {
249
249
+
"id": {
250
250
+
"name": "id",
251
251
+
"type": "uuid",
252
252
+
"primaryKey": true,
253
253
+
"notNull": true
254
254
+
},
255
255
+
"collection_id": {
256
256
+
"name": "collection_id",
257
257
+
"type": "uuid",
258
258
+
"primaryKey": false,
259
259
+
"notNull": true
260
260
+
},
261
261
+
"collaborator_id": {
262
262
+
"name": "collaborator_id",
263
263
+
"type": "text",
264
264
+
"primaryKey": false,
265
265
+
"notNull": true
266
266
+
}
267
267
+
},
268
268
+
"indexes": {},
269
269
+
"foreignKeys": {
270
270
+
"collection_collaborators_collection_id_collections_id_fk": {
271
271
+
"name": "collection_collaborators_collection_id_collections_id_fk",
272
272
+
"tableFrom": "collection_collaborators",
273
273
+
"columnsFrom": [
274
274
+
"collection_id"
275
275
+
],
276
276
+
"tableTo": "collections",
277
277
+
"columnsTo": [
278
278
+
"id"
279
279
+
],
280
280
+
"onUpdate": "no action",
281
281
+
"onDelete": "cascade"
282
282
+
}
283
283
+
},
284
284
+
"compositePrimaryKeys": {},
285
285
+
"uniqueConstraints": {},
286
286
+
"policies": {},
287
287
+
"checkConstraints": {},
288
288
+
"isRLSEnabled": false
289
289
+
},
290
290
+
"public.collections": {
291
291
+
"name": "collections",
292
292
+
"schema": "",
293
293
+
"columns": {
294
294
+
"id": {
295
295
+
"name": "id",
296
296
+
"type": "uuid",
297
297
+
"primaryKey": true,
298
298
+
"notNull": true
299
299
+
},
300
300
+
"author_id": {
301
301
+
"name": "author_id",
302
302
+
"type": "text",
303
303
+
"primaryKey": false,
304
304
+
"notNull": true
305
305
+
},
306
306
+
"name": {
307
307
+
"name": "name",
308
308
+
"type": "text",
309
309
+
"primaryKey": false,
310
310
+
"notNull": true
311
311
+
},
312
312
+
"description": {
313
313
+
"name": "description",
314
314
+
"type": "text",
315
315
+
"primaryKey": false,
316
316
+
"notNull": false
317
317
+
},
318
318
+
"access_type": {
319
319
+
"name": "access_type",
320
320
+
"type": "text",
321
321
+
"primaryKey": false,
322
322
+
"notNull": true
323
323
+
},
324
324
+
"card_count": {
325
325
+
"name": "card_count",
326
326
+
"type": "integer",
327
327
+
"primaryKey": false,
328
328
+
"notNull": true,
329
329
+
"default": 0
330
330
+
},
331
331
+
"created_at": {
332
332
+
"name": "created_at",
333
333
+
"type": "timestamp",
334
334
+
"primaryKey": false,
335
335
+
"notNull": true,
336
336
+
"default": "now()"
337
337
+
},
338
338
+
"updated_at": {
339
339
+
"name": "updated_at",
340
340
+
"type": "timestamp",
341
341
+
"primaryKey": false,
342
342
+
"notNull": true,
343
343
+
"default": "now()"
344
344
+
},
345
345
+
"published_record_id": {
346
346
+
"name": "published_record_id",
347
347
+
"type": "uuid",
348
348
+
"primaryKey": false,
349
349
+
"notNull": false
350
350
+
}
351
351
+
},
352
352
+
"indexes": {},
353
353
+
"foreignKeys": {
354
354
+
"collections_published_record_id_published_records_id_fk": {
355
355
+
"name": "collections_published_record_id_published_records_id_fk",
356
356
+
"tableFrom": "collections",
357
357
+
"columnsFrom": [
358
358
+
"published_record_id"
359
359
+
],
360
360
+
"tableTo": "published_records",
361
361
+
"columnsTo": [
362
362
+
"id"
363
363
+
],
364
364
+
"onUpdate": "no action",
365
365
+
"onDelete": "no action"
366
366
+
}
367
367
+
},
368
368
+
"compositePrimaryKeys": {},
369
369
+
"uniqueConstraints": {},
370
370
+
"policies": {},
371
371
+
"checkConstraints": {},
372
372
+
"isRLSEnabled": false
373
373
+
},
374
374
+
"public.library_memberships": {
375
375
+
"name": "library_memberships",
376
376
+
"schema": "",
377
377
+
"columns": {
378
378
+
"card_id": {
379
379
+
"name": "card_id",
380
380
+
"type": "uuid",
381
381
+
"primaryKey": false,
382
382
+
"notNull": true
383
383
+
},
384
384
+
"user_id": {
385
385
+
"name": "user_id",
386
386
+
"type": "text",
387
387
+
"primaryKey": false,
388
388
+
"notNull": true
389
389
+
},
390
390
+
"added_at": {
391
391
+
"name": "added_at",
392
392
+
"type": "timestamp",
393
393
+
"primaryKey": false,
394
394
+
"notNull": true,
395
395
+
"default": "now()"
396
396
+
},
397
397
+
"published_record_id": {
398
398
+
"name": "published_record_id",
399
399
+
"type": "uuid",
400
400
+
"primaryKey": false,
401
401
+
"notNull": false
402
402
+
}
403
403
+
},
404
404
+
"indexes": {
405
405
+
"idx_user_cards": {
406
406
+
"name": "idx_user_cards",
407
407
+
"columns": [
408
408
+
{
409
409
+
"expression": "user_id",
410
410
+
"isExpression": false,
411
411
+
"asc": true,
412
412
+
"nulls": "last"
413
413
+
}
414
414
+
],
415
415
+
"isUnique": false,
416
416
+
"with": {},
417
417
+
"method": "btree",
418
418
+
"concurrently": false
419
419
+
},
420
420
+
"idx_card_users": {
421
421
+
"name": "idx_card_users",
422
422
+
"columns": [
423
423
+
{
424
424
+
"expression": "card_id",
425
425
+
"isExpression": false,
426
426
+
"asc": true,
427
427
+
"nulls": "last"
428
428
+
}
429
429
+
],
430
430
+
"isUnique": false,
431
431
+
"with": {},
432
432
+
"method": "btree",
433
433
+
"concurrently": false
434
434
+
}
435
435
+
},
436
436
+
"foreignKeys": {
437
437
+
"library_memberships_card_id_cards_id_fk": {
438
438
+
"name": "library_memberships_card_id_cards_id_fk",
439
439
+
"tableFrom": "library_memberships",
440
440
+
"columnsFrom": [
441
441
+
"card_id"
442
442
+
],
443
443
+
"tableTo": "cards",
444
444
+
"columnsTo": [
445
445
+
"id"
446
446
+
],
447
447
+
"onUpdate": "no action",
448
448
+
"onDelete": "cascade"
449
449
+
},
450
450
+
"library_memberships_published_record_id_published_records_id_fk": {
451
451
+
"name": "library_memberships_published_record_id_published_records_id_fk",
452
452
+
"tableFrom": "library_memberships",
453
453
+
"columnsFrom": [
454
454
+
"published_record_id"
455
455
+
],
456
456
+
"tableTo": "published_records",
457
457
+
"columnsTo": [
458
458
+
"id"
459
459
+
],
460
460
+
"onUpdate": "no action",
461
461
+
"onDelete": "no action"
462
462
+
}
463
463
+
},
464
464
+
"compositePrimaryKeys": {
465
465
+
"library_memberships_card_id_user_id_pk": {
466
466
+
"name": "library_memberships_card_id_user_id_pk",
467
467
+
"columns": [
468
468
+
"card_id",
469
469
+
"user_id"
470
470
+
]
471
471
+
}
472
472
+
},
473
473
+
"uniqueConstraints": {},
474
474
+
"policies": {},
475
475
+
"checkConstraints": {},
476
476
+
"isRLSEnabled": false
477
477
+
},
478
478
+
"public.published_records": {
479
479
+
"name": "published_records",
480
480
+
"schema": "",
481
481
+
"columns": {
482
482
+
"id": {
483
483
+
"name": "id",
484
484
+
"type": "uuid",
485
485
+
"primaryKey": true,
486
486
+
"notNull": true
487
487
+
},
488
488
+
"uri": {
489
489
+
"name": "uri",
490
490
+
"type": "text",
491
491
+
"primaryKey": false,
492
492
+
"notNull": true
493
493
+
},
494
494
+
"cid": {
495
495
+
"name": "cid",
496
496
+
"type": "text",
497
497
+
"primaryKey": false,
498
498
+
"notNull": true
499
499
+
},
500
500
+
"recorded_at": {
501
501
+
"name": "recorded_at",
502
502
+
"type": "timestamp",
503
503
+
"primaryKey": false,
504
504
+
"notNull": true,
505
505
+
"default": "now()"
506
506
+
}
507
507
+
},
508
508
+
"indexes": {
509
509
+
"uri_cid_unique_idx": {
510
510
+
"name": "uri_cid_unique_idx",
511
511
+
"columns": [
512
512
+
{
513
513
+
"expression": "uri",
514
514
+
"isExpression": false,
515
515
+
"asc": true,
516
516
+
"nulls": "last"
517
517
+
},
518
518
+
{
519
519
+
"expression": "cid",
520
520
+
"isExpression": false,
521
521
+
"asc": true,
522
522
+
"nulls": "last"
523
523
+
}
524
524
+
],
525
525
+
"isUnique": true,
526
526
+
"with": {},
527
527
+
"method": "btree",
528
528
+
"concurrently": false
529
529
+
},
530
530
+
"published_records_uri_idx": {
531
531
+
"name": "published_records_uri_idx",
532
532
+
"columns": [
533
533
+
{
534
534
+
"expression": "uri",
535
535
+
"isExpression": false,
536
536
+
"asc": true,
537
537
+
"nulls": "last"
538
538
+
}
539
539
+
],
540
540
+
"isUnique": false,
541
541
+
"with": {},
542
542
+
"method": "btree",
543
543
+
"concurrently": false
544
544
+
}
545
545
+
},
546
546
+
"foreignKeys": {},
547
547
+
"compositePrimaryKeys": {},
548
548
+
"uniqueConstraints": {},
549
549
+
"policies": {},
550
550
+
"checkConstraints": {},
551
551
+
"isRLSEnabled": false
552
552
+
},
553
553
+
"public.feed_activities": {
554
554
+
"name": "feed_activities",
555
555
+
"schema": "",
556
556
+
"columns": {
557
557
+
"id": {
558
558
+
"name": "id",
559
559
+
"type": "uuid",
560
560
+
"primaryKey": true,
561
561
+
"notNull": true
562
562
+
},
563
563
+
"actor_id": {
564
564
+
"name": "actor_id",
565
565
+
"type": "text",
566
566
+
"primaryKey": false,
567
567
+
"notNull": true
568
568
+
},
569
569
+
"type": {
570
570
+
"name": "type",
571
571
+
"type": "text",
572
572
+
"primaryKey": false,
573
573
+
"notNull": true
574
574
+
},
575
575
+
"metadata": {
576
576
+
"name": "metadata",
577
577
+
"type": "jsonb",
578
578
+
"primaryKey": false,
579
579
+
"notNull": true
580
580
+
},
581
581
+
"created_at": {
582
582
+
"name": "created_at",
583
583
+
"type": "timestamp",
584
584
+
"primaryKey": false,
585
585
+
"notNull": true,
586
586
+
"default": "now()"
587
587
+
}
588
588
+
},
589
589
+
"indexes": {},
590
590
+
"foreignKeys": {},
591
591
+
"compositePrimaryKeys": {},
592
592
+
"uniqueConstraints": {},
593
593
+
"policies": {},
594
594
+
"checkConstraints": {},
595
595
+
"isRLSEnabled": false
596
596
+
},
597
597
+
"public.auth_session": {
598
598
+
"name": "auth_session",
599
599
+
"schema": "",
600
600
+
"columns": {
601
601
+
"key": {
602
602
+
"name": "key",
603
603
+
"type": "text",
604
604
+
"primaryKey": true,
605
605
+
"notNull": true
606
606
+
},
607
607
+
"session": {
608
608
+
"name": "session",
609
609
+
"type": "text",
610
610
+
"primaryKey": false,
611
611
+
"notNull": true
612
612
+
}
613
613
+
},
614
614
+
"indexes": {},
615
615
+
"foreignKeys": {},
616
616
+
"compositePrimaryKeys": {},
617
617
+
"uniqueConstraints": {},
618
618
+
"policies": {},
619
619
+
"checkConstraints": {},
620
620
+
"isRLSEnabled": false
621
621
+
},
622
622
+
"public.auth_state": {
623
623
+
"name": "auth_state",
624
624
+
"schema": "",
625
625
+
"columns": {
626
626
+
"key": {
627
627
+
"name": "key",
628
628
+
"type": "text",
629
629
+
"primaryKey": true,
630
630
+
"notNull": true
631
631
+
},
632
632
+
"state": {
633
633
+
"name": "state",
634
634
+
"type": "text",
635
635
+
"primaryKey": false,
636
636
+
"notNull": true
637
637
+
},
638
638
+
"created_at": {
639
639
+
"name": "created_at",
640
640
+
"type": "timestamp",
641
641
+
"primaryKey": false,
642
642
+
"notNull": false,
643
643
+
"default": "now()"
644
644
+
}
645
645
+
},
646
646
+
"indexes": {},
647
647
+
"foreignKeys": {},
648
648
+
"compositePrimaryKeys": {},
649
649
+
"uniqueConstraints": {},
650
650
+
"policies": {},
651
651
+
"checkConstraints": {},
652
652
+
"isRLSEnabled": false
653
653
+
},
654
654
+
"public.auth_refresh_tokens": {
655
655
+
"name": "auth_refresh_tokens",
656
656
+
"schema": "",
657
657
+
"columns": {
658
658
+
"token_id": {
659
659
+
"name": "token_id",
660
660
+
"type": "text",
661
661
+
"primaryKey": true,
662
662
+
"notNull": true
663
663
+
},
664
664
+
"user_did": {
665
665
+
"name": "user_did",
666
666
+
"type": "text",
667
667
+
"primaryKey": false,
668
668
+
"notNull": true
669
669
+
},
670
670
+
"refresh_token": {
671
671
+
"name": "refresh_token",
672
672
+
"type": "text",
673
673
+
"primaryKey": false,
674
674
+
"notNull": true
675
675
+
},
676
676
+
"issued_at": {
677
677
+
"name": "issued_at",
678
678
+
"type": "timestamp",
679
679
+
"primaryKey": false,
680
680
+
"notNull": true
681
681
+
},
682
682
+
"expires_at": {
683
683
+
"name": "expires_at",
684
684
+
"type": "timestamp",
685
685
+
"primaryKey": false,
686
686
+
"notNull": true
687
687
+
},
688
688
+
"revoked": {
689
689
+
"name": "revoked",
690
690
+
"type": "boolean",
691
691
+
"primaryKey": false,
692
692
+
"notNull": false,
693
693
+
"default": false
694
694
+
}
695
695
+
},
696
696
+
"indexes": {},
697
697
+
"foreignKeys": {
698
698
+
"auth_refresh_tokens_user_did_users_id_fk": {
699
699
+
"name": "auth_refresh_tokens_user_did_users_id_fk",
700
700
+
"tableFrom": "auth_refresh_tokens",
701
701
+
"columnsFrom": [
702
702
+
"user_did"
703
703
+
],
704
704
+
"tableTo": "users",
705
705
+
"columnsTo": [
706
706
+
"id"
707
707
+
],
708
708
+
"onUpdate": "no action",
709
709
+
"onDelete": "no action"
710
710
+
}
711
711
+
},
712
712
+
"compositePrimaryKeys": {},
713
713
+
"uniqueConstraints": {},
714
714
+
"policies": {},
715
715
+
"checkConstraints": {},
716
716
+
"isRLSEnabled": false
717
717
+
},
718
718
+
"public.users": {
719
719
+
"name": "users",
720
720
+
"schema": "",
721
721
+
"columns": {
722
722
+
"id": {
723
723
+
"name": "id",
724
724
+
"type": "text",
725
725
+
"primaryKey": true,
726
726
+
"notNull": true
727
727
+
},
728
728
+
"handle": {
729
729
+
"name": "handle",
730
730
+
"type": "text",
731
731
+
"primaryKey": false,
732
732
+
"notNull": false
733
733
+
},
734
734
+
"linked_at": {
735
735
+
"name": "linked_at",
736
736
+
"type": "timestamp",
737
737
+
"primaryKey": false,
738
738
+
"notNull": true
739
739
+
},
740
740
+
"last_login_at": {
741
741
+
"name": "last_login_at",
742
742
+
"type": "timestamp",
743
743
+
"primaryKey": false,
744
744
+
"notNull": true
745
745
+
}
746
746
+
},
747
747
+
"indexes": {},
748
748
+
"foreignKeys": {},
749
749
+
"compositePrimaryKeys": {},
750
750
+
"uniqueConstraints": {},
751
751
+
"policies": {},
752
752
+
"checkConstraints": {},
753
753
+
"isRLSEnabled": false
754
754
+
}
755
755
+
},
756
756
+
"enums": {},
757
757
+
"schemas": {},
758
758
+
"views": {},
759
759
+
"sequences": {},
760
760
+
"roles": {},
761
761
+
"policies": {},
762
762
+
"_meta": {
763
763
+
"columns": {},
764
764
+
"schemas": {},
765
765
+
"tables": {}
766
766
+
}
767
767
+
}
+7
src/shared/infrastructure/database/migrations/meta/_journal.json
···
36
36
"when": 1759875361391,
37
37
"tag": "0004_brainy_rocket_racer",
38
38
"breakpoints": true
39
39
+
},
40
40
+
{
41
41
+
"idx": 5,
42
42
+
"version": "7",
43
43
+
"when": 1759957391430,
44
44
+
"tag": "0005_truncate-tables",
45
45
+
"breakpoints": true
39
46
}
40
47
]
41
48
}