mirror your GitHub repos to tangled.org automatically
1{
2 "id": "193eacb9-82ee-487b-a19c-0bb1448f0b5a",
3 "prevId": "00000000-0000-0000-0000-000000000000",
4 "version": "7",
5 "dialect": "postgresql",
6 "tables": {
7 "public.atproto_session": {
8 "name": "atproto_session",
9 "schema": "",
10 "columns": {
11 "sub": {
12 "name": "sub",
13 "type": "text",
14 "primaryKey": true,
15 "notNull": true
16 },
17 "value_ciphertext": {
18 "name": "value_ciphertext",
19 "type": "bytea",
20 "primaryKey": false,
21 "notNull": true
22 },
23 "value_nonce": {
24 "name": "value_nonce",
25 "type": "bytea",
26 "primaryKey": false,
27 "notNull": true
28 },
29 "created_at": {
30 "name": "created_at",
31 "type": "timestamp with time zone",
32 "primaryKey": false,
33 "notNull": true,
34 "default": "now()"
35 },
36 "updated_at": {
37 "name": "updated_at",
38 "type": "timestamp with time zone",
39 "primaryKey": false,
40 "notNull": false
41 }
42 },
43 "indexes": {},
44 "foreignKeys": {},
45 "compositePrimaryKeys": {},
46 "uniqueConstraints": {},
47 "policies": {},
48 "checkConstraints": {},
49 "isRLSEnabled": false
50 },
51 "public.atproto_state": {
52 "name": "atproto_state",
53 "schema": "",
54 "columns": {
55 "key": {
56 "name": "key",
57 "type": "text",
58 "primaryKey": true,
59 "notNull": true
60 },
61 "value_ciphertext": {
62 "name": "value_ciphertext",
63 "type": "bytea",
64 "primaryKey": false,
65 "notNull": true
66 },
67 "value_nonce": {
68 "name": "value_nonce",
69 "type": "bytea",
70 "primaryKey": false,
71 "notNull": true
72 },
73 "created_at": {
74 "name": "created_at",
75 "type": "timestamp with time zone",
76 "primaryKey": false,
77 "notNull": true,
78 "default": "now()"
79 }
80 },
81 "indexes": {},
82 "foreignKeys": {},
83 "compositePrimaryKeys": {},
84 "uniqueConstraints": {},
85 "policies": {},
86 "checkConstraints": {},
87 "isRLSEnabled": false
88 },
89 "public.installation": {
90 "name": "installation",
91 "schema": "",
92 "columns": {
93 "id": {
94 "name": "id",
95 "type": "bigint",
96 "primaryKey": true,
97 "notNull": true
98 },
99 "account_login": {
100 "name": "account_login",
101 "type": "text",
102 "primaryKey": false,
103 "notNull": true
104 },
105 "account_id": {
106 "name": "account_id",
107 "type": "bigint",
108 "primaryKey": false,
109 "notNull": true
110 },
111 "account_type": {
112 "name": "account_type",
113 "type": "text",
114 "primaryKey": false,
115 "notNull": true
116 },
117 "suspended_at": {
118 "name": "suspended_at",
119 "type": "timestamp with time zone",
120 "primaryKey": false,
121 "notNull": false
122 },
123 "created_at": {
124 "name": "created_at",
125 "type": "timestamp with time zone",
126 "primaryKey": false,
127 "notNull": true,
128 "default": "now()"
129 }
130 },
131 "indexes": {},
132 "foreignKeys": {},
133 "compositePrimaryKeys": {},
134 "uniqueConstraints": {},
135 "policies": {},
136 "checkConstraints": {
137 "installation_account_type_chk": {
138 "name": "installation_account_type_chk",
139 "value": "\"installation\".\"account_type\" in ('User','Organization')"
140 }
141 },
142 "isRLSEnabled": false
143 },
144 "public.job": {
145 "name": "job",
146 "schema": "",
147 "columns": {
148 "id": {
149 "name": "id",
150 "type": "bigserial",
151 "primaryKey": true,
152 "notNull": true
153 },
154 "kind": {
155 "name": "kind",
156 "type": "text",
157 "primaryKey": false,
158 "notNull": true
159 },
160 "payload": {
161 "name": "payload",
162 "type": "jsonb",
163 "primaryKey": false,
164 "notNull": true
165 },
166 "attempts": {
167 "name": "attempts",
168 "type": "integer",
169 "primaryKey": false,
170 "notNull": true,
171 "default": 0
172 },
173 "run_after": {
174 "name": "run_after",
175 "type": "timestamp with time zone",
176 "primaryKey": false,
177 "notNull": true,
178 "default": "now()"
179 },
180 "locked_by": {
181 "name": "locked_by",
182 "type": "text",
183 "primaryKey": false,
184 "notNull": false
185 },
186 "locked_until": {
187 "name": "locked_until",
188 "type": "timestamp with time zone",
189 "primaryKey": false,
190 "notNull": false
191 },
192 "status": {
193 "name": "status",
194 "type": "text",
195 "primaryKey": false,
196 "notNull": true,
197 "default": "'queued'"
198 },
199 "last_error": {
200 "name": "last_error",
201 "type": "text",
202 "primaryKey": false,
203 "notNull": false
204 },
205 "created_at": {
206 "name": "created_at",
207 "type": "timestamp with time zone",
208 "primaryKey": false,
209 "notNull": true,
210 "default": "now()"
211 },
212 "updated_at": {
213 "name": "updated_at",
214 "type": "timestamp with time zone",
215 "primaryKey": false,
216 "notNull": false
217 }
218 },
219 "indexes": {
220 "job_status_run_after_idx": {
221 "name": "job_status_run_after_idx",
222 "columns": [
223 {
224 "expression": "status",
225 "isExpression": false,
226 "asc": true,
227 "nulls": "last"
228 },
229 {
230 "expression": "run_after",
231 "isExpression": false,
232 "asc": true,
233 "nulls": "last"
234 }
235 ],
236 "isUnique": false,
237 "concurrently": false,
238 "method": "btree",
239 "with": {}
240 }
241 },
242 "foreignKeys": {},
243 "compositePrimaryKeys": {},
244 "uniqueConstraints": {},
245 "policies": {},
246 "checkConstraints": {
247 "job_status_chk": {
248 "name": "job_status_chk",
249 "value": "\"job\".\"status\" in ('queued','running','done','failed')"
250 }
251 },
252 "isRLSEnabled": false
253 },
254 "public.repo_mapping": {
255 "name": "repo_mapping",
256 "schema": "",
257 "columns": {
258 "id": {
259 "name": "id",
260 "type": "bigserial",
261 "primaryKey": true,
262 "notNull": true
263 },
264 "installation_id": {
265 "name": "installation_id",
266 "type": "bigint",
267 "primaryKey": false,
268 "notNull": true
269 },
270 "github_repo_id": {
271 "name": "github_repo_id",
272 "type": "bigint",
273 "primaryKey": false,
274 "notNull": true
275 },
276 "github_full_name": {
277 "name": "github_full_name",
278 "type": "text",
279 "primaryKey": false,
280 "notNull": true
281 },
282 "tangled_repo_did": {
283 "name": "tangled_repo_did",
284 "type": "text",
285 "primaryKey": false,
286 "notNull": false
287 },
288 "tangled_full_name": {
289 "name": "tangled_full_name",
290 "type": "text",
291 "primaryKey": false,
292 "notNull": false
293 },
294 "knot": {
295 "name": "knot",
296 "type": "text",
297 "primaryKey": false,
298 "notNull": false
299 },
300 "primary_side": {
301 "name": "primary_side",
302 "type": "text",
303 "primaryKey": false,
304 "notNull": true,
305 "default": "'github'"
306 },
307 "last_synced_refs": {
308 "name": "last_synced_refs",
309 "type": "jsonb",
310 "primaryKey": false,
311 "notNull": true,
312 "default": "'{}'::jsonb"
313 },
314 "status": {
315 "name": "status",
316 "type": "text",
317 "primaryKey": false,
318 "notNull": true,
319 "default": "'pending'"
320 },
321 "last_error": {
322 "name": "last_error",
323 "type": "text",
324 "primaryKey": false,
325 "notNull": false
326 },
327 "disabled_at": {
328 "name": "disabled_at",
329 "type": "timestamp with time zone",
330 "primaryKey": false,
331 "notNull": false
332 },
333 "created_at": {
334 "name": "created_at",
335 "type": "timestamp with time zone",
336 "primaryKey": false,
337 "notNull": true,
338 "default": "now()"
339 },
340 "updated_at": {
341 "name": "updated_at",
342 "type": "timestamp with time zone",
343 "primaryKey": false,
344 "notNull": false
345 }
346 },
347 "indexes": {
348 "repo_mapping_installation_idx": {
349 "name": "repo_mapping_installation_idx",
350 "columns": [
351 {
352 "expression": "installation_id",
353 "isExpression": false,
354 "asc": true,
355 "nulls": "last"
356 }
357 ],
358 "isUnique": false,
359 "concurrently": false,
360 "method": "btree",
361 "with": {}
362 }
363 },
364 "foreignKeys": {
365 "repo_mapping_installation_id_installation_id_fk": {
366 "name": "repo_mapping_installation_id_installation_id_fk",
367 "tableFrom": "repo_mapping",
368 "tableTo": "installation",
369 "columnsFrom": [
370 "installation_id"
371 ],
372 "columnsTo": [
373 "id"
374 ],
375 "onDelete": "cascade",
376 "onUpdate": "no action"
377 }
378 },
379 "compositePrimaryKeys": {},
380 "uniqueConstraints": {
381 "repo_mapping_installation_repo_unq": {
382 "name": "repo_mapping_installation_repo_unq",
383 "nullsNotDistinct": false,
384 "columns": [
385 "installation_id",
386 "github_repo_id"
387 ]
388 }
389 },
390 "policies": {},
391 "checkConstraints": {
392 "repo_mapping_primary_side_chk": {
393 "name": "repo_mapping_primary_side_chk",
394 "value": "\"repo_mapping\".\"primary_side\" in ('github','tangled')"
395 },
396 "repo_mapping_status_chk": {
397 "name": "repo_mapping_status_chk",
398 "value": "\"repo_mapping\".\"status\" in ('pending','enrolling','active','error')"
399 }
400 },
401 "isRLSEnabled": false
402 },
403 "public.ssh_key": {
404 "name": "ssh_key",
405 "schema": "",
406 "columns": {
407 "id": {
408 "name": "id",
409 "type": "bigserial",
410 "primaryKey": true,
411 "notNull": true
412 },
413 "installation_id": {
414 "name": "installation_id",
415 "type": "bigint",
416 "primaryKey": false,
417 "notNull": true
418 },
419 "did": {
420 "name": "did",
421 "type": "text",
422 "primaryKey": false,
423 "notNull": true
424 },
425 "public_key": {
426 "name": "public_key",
427 "type": "text",
428 "primaryKey": false,
429 "notNull": true
430 },
431 "private_key_ciphertext": {
432 "name": "private_key_ciphertext",
433 "type": "bytea",
434 "primaryKey": false,
435 "notNull": true
436 },
437 "private_key_nonce": {
438 "name": "private_key_nonce",
439 "type": "bytea",
440 "primaryKey": false,
441 "notNull": true
442 },
443 "tangled_key_rkey": {
444 "name": "tangled_key_rkey",
445 "type": "text",
446 "primaryKey": false,
447 "notNull": false
448 },
449 "created_at": {
450 "name": "created_at",
451 "type": "timestamp with time zone",
452 "primaryKey": false,
453 "notNull": true,
454 "default": "now()"
455 },
456 "rotated_at": {
457 "name": "rotated_at",
458 "type": "timestamp with time zone",
459 "primaryKey": false,
460 "notNull": false
461 }
462 },
463 "indexes": {
464 "ssh_key_installation_idx": {
465 "name": "ssh_key_installation_idx",
466 "columns": [
467 {
468 "expression": "installation_id",
469 "isExpression": false,
470 "asc": true,
471 "nulls": "last"
472 }
473 ],
474 "isUnique": false,
475 "concurrently": false,
476 "method": "btree",
477 "with": {}
478 }
479 },
480 "foreignKeys": {
481 "ssh_key_installation_id_installation_id_fk": {
482 "name": "ssh_key_installation_id_installation_id_fk",
483 "tableFrom": "ssh_key",
484 "tableTo": "installation",
485 "columnsFrom": [
486 "installation_id"
487 ],
488 "columnsTo": [
489 "id"
490 ],
491 "onDelete": "cascade",
492 "onUpdate": "no action"
493 }
494 },
495 "compositePrimaryKeys": {},
496 "uniqueConstraints": {
497 "ssh_key_installation_did_unq": {
498 "name": "ssh_key_installation_did_unq",
499 "nullsNotDistinct": false,
500 "columns": [
501 "installation_id",
502 "did"
503 ]
504 }
505 },
506 "policies": {},
507 "checkConstraints": {},
508 "isRLSEnabled": false
509 },
510 "public.user_identity": {
511 "name": "user_identity",
512 "schema": "",
513 "columns": {
514 "did": {
515 "name": "did",
516 "type": "text",
517 "primaryKey": true,
518 "notNull": true
519 },
520 "handle": {
521 "name": "handle",
522 "type": "text",
523 "primaryKey": false,
524 "notNull": false
525 },
526 "installation_id": {
527 "name": "installation_id",
528 "type": "bigint",
529 "primaryKey": false,
530 "notNull": false
531 },
532 "created_at": {
533 "name": "created_at",
534 "type": "timestamp with time zone",
535 "primaryKey": false,
536 "notNull": true,
537 "default": "now()"
538 },
539 "updated_at": {
540 "name": "updated_at",
541 "type": "timestamp with time zone",
542 "primaryKey": false,
543 "notNull": false
544 }
545 },
546 "indexes": {
547 "user_identity_installation_idx": {
548 "name": "user_identity_installation_idx",
549 "columns": [
550 {
551 "expression": "installation_id",
552 "isExpression": false,
553 "asc": true,
554 "nulls": "last"
555 }
556 ],
557 "isUnique": false,
558 "concurrently": false,
559 "method": "btree",
560 "with": {}
561 }
562 },
563 "foreignKeys": {
564 "user_identity_installation_id_installation_id_fk": {
565 "name": "user_identity_installation_id_installation_id_fk",
566 "tableFrom": "user_identity",
567 "tableTo": "installation",
568 "columnsFrom": [
569 "installation_id"
570 ],
571 "columnsTo": [
572 "id"
573 ],
574 "onDelete": "cascade",
575 "onUpdate": "no action"
576 }
577 },
578 "compositePrimaryKeys": {},
579 "uniqueConstraints": {},
580 "policies": {},
581 "checkConstraints": {},
582 "isRLSEnabled": false
583 },
584 "public.webhook_event": {
585 "name": "webhook_event",
586 "schema": "",
587 "columns": {
588 "delivery_id": {
589 "name": "delivery_id",
590 "type": "uuid",
591 "primaryKey": true,
592 "notNull": true
593 },
594 "source": {
595 "name": "source",
596 "type": "text",
597 "primaryKey": false,
598 "notNull": true
599 },
600 "event": {
601 "name": "event",
602 "type": "text",
603 "primaryKey": false,
604 "notNull": true
605 },
606 "received_at": {
607 "name": "received_at",
608 "type": "timestamp with time zone",
609 "primaryKey": false,
610 "notNull": true,
611 "default": "now()"
612 },
613 "processed_at": {
614 "name": "processed_at",
615 "type": "timestamp with time zone",
616 "primaryKey": false,
617 "notNull": false
618 }
619 },
620 "indexes": {},
621 "foreignKeys": {},
622 "compositePrimaryKeys": {},
623 "uniqueConstraints": {},
624 "policies": {},
625 "checkConstraints": {
626 "webhook_event_source_chk": {
627 "name": "webhook_event_source_chk",
628 "value": "\"webhook_event\".\"source\" in ('github','tangled')"
629 }
630 },
631 "isRLSEnabled": false
632 }
633 },
634 "enums": {},
635 "schemas": {},
636 "sequences": {},
637 "roles": {},
638 "policies": {},
639 "views": {},
640 "_meta": {
641 "columns": {},
642 "schemas": {},
643 "tables": {}
644 }
645}