-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructure.sql
More file actions
1418 lines (1056 loc) · 49.8 KB
/
structure.sql
File metadata and controls
1418 lines (1056 loc) · 49.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
CREATE TABLE active_storage_attachments (
id bigint NOT NULL,
name character varying NOT NULL,
record_type character varying NOT NULL,
record_id bigint NOT NULL,
blob_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE active_storage_attachments_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE active_storage_attachments_id_seq OWNED BY active_storage_attachments.id;
CREATE TABLE active_storage_blobs (
id bigint NOT NULL,
key character varying NOT NULL,
filename character varying NOT NULL,
content_type character varying,
metadata text,
service_name character varying NOT NULL,
byte_size bigint NOT NULL,
checksum character varying,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE active_storage_blobs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE active_storage_blobs_id_seq OWNED BY active_storage_blobs.id;
CREATE TABLE active_storage_variant_records (
id bigint NOT NULL,
blob_id bigint NOT NULL,
variation_digest character varying NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE active_storage_variant_records_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE active_storage_variant_records_id_seq OWNED BY active_storage_variant_records.id;
CREATE TABLE application_settings (
id bigint NOT NULL,
setting integer NOT NULL,
value jsonb,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE application_settings_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE application_settings_id_seq OWNED BY application_settings.id;
CREATE TABLE ar_internal_metadata (
key character varying NOT NULL,
value character varying,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL
);
CREATE TABLE audit_events (
id bigint NOT NULL,
author_id bigint NOT NULL,
entity_id integer NOT NULL,
entity_type text NOT NULL,
action_type integer NOT NULL,
details jsonb NOT NULL,
ip_address inet,
target_id integer NOT NULL,
target_type text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE audit_events_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE audit_events_id_seq OWNED BY audit_events.id;
CREATE TABLE backup_codes (
id bigint NOT NULL,
token text NOT NULL,
user_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
CONSTRAINT check_458fe46218 CHECK ((char_length(token) <= 10))
);
CREATE SEQUENCE backup_codes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE backup_codes_id_seq OWNED BY backup_codes.id;
CREATE TABLE data_type_identifiers (
id bigint NOT NULL,
generic_key text,
data_type_id bigint,
runtime_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
generic_type_id bigint,
generic_mapper_id bigint,
CONSTRAINT check_480d44acbd CHECK ((num_nonnulls(generic_key, data_type_id, generic_type_id) = 1))
);
CREATE SEQUENCE data_type_identifiers_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE data_type_identifiers_id_seq OWNED BY data_type_identifiers.id;
CREATE TABLE data_type_rules (
id bigint NOT NULL,
data_type_id bigint NOT NULL,
variant integer NOT NULL,
config jsonb NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE data_type_rules_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE data_type_rules_id_seq OWNED BY data_type_rules.id;
CREATE TABLE data_types (
id bigint NOT NULL,
identifier text NOT NULL,
variant integer NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
runtime_id bigint NOT NULL,
removed_at timestamp with time zone,
generic_keys text[] DEFAULT '{}'::text[] NOT NULL,
parent_type_id bigint,
version text NOT NULL,
CONSTRAINT check_3a7198812e CHECK ((char_length(identifier) <= 50))
);
CREATE SEQUENCE data_types_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE data_types_id_seq OWNED BY data_types.id;
CREATE TABLE flow_settings (
id bigint NOT NULL,
flow_id bigint NOT NULL,
flow_setting_id text NOT NULL,
object jsonb NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE flow_settings_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE flow_settings_id_seq OWNED BY flow_settings.id;
CREATE TABLE flow_type_settings (
id bigint NOT NULL,
flow_type_id bigint NOT NULL,
identifier text NOT NULL,
data_type_id bigint NOT NULL,
default_value jsonb,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
"unique" integer DEFAULT 0 NOT NULL
);
CREATE SEQUENCE flow_type_settings_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE flow_type_settings_id_seq OWNED BY flow_type_settings.id;
CREATE TABLE flow_types (
id bigint NOT NULL,
runtime_id bigint NOT NULL,
identifier text NOT NULL,
input_type_id bigint,
return_type_id bigint,
editable boolean DEFAULT true NOT NULL,
removed_at timestamp with time zone,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
version text NOT NULL
);
CREATE SEQUENCE flow_types_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE flow_types_id_seq OWNED BY flow_types.id;
CREATE TABLE flows (
id bigint NOT NULL,
project_id bigint NOT NULL,
flow_type_id bigint NOT NULL,
input_type_id bigint,
return_type_id bigint,
starting_node_id bigint,
name text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE flows_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE flows_id_seq OWNED BY flows.id;
CREATE TABLE function_definitions (
id bigint NOT NULL,
runtime_function_definition_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
return_type_id bigint
);
CREATE SEQUENCE function_definitions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE function_definitions_id_seq OWNED BY function_definitions.id;
CREATE TABLE generic_combination_strategies (
id bigint NOT NULL,
type integer NOT NULL,
generic_mapper_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE generic_combination_strategies_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE generic_combination_strategies_id_seq OWNED BY generic_combination_strategies.id;
CREATE TABLE generic_mappers (
id bigint NOT NULL,
runtime_id bigint NOT NULL,
target text NOT NULL,
generic_type_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE generic_mappers_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE generic_mappers_id_seq OWNED BY generic_mappers.id;
CREATE TABLE generic_types (
id bigint NOT NULL,
data_type_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
owner_type character varying,
owner_id bigint
);
CREATE SEQUENCE generic_types_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE generic_types_id_seq OWNED BY generic_types.id;
CREATE TABLE good_job_batches (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
description text,
serialized_properties jsonb,
on_finish text,
on_success text,
on_discard text,
callback_queue_name text,
callback_priority integer,
enqueued_at timestamp with time zone,
discarded_at timestamp with time zone,
finished_at timestamp with time zone,
jobs_finished_at timestamp with time zone
);
CREATE TABLE good_job_executions (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
active_job_id uuid NOT NULL,
job_class text,
queue_name text,
serialized_params jsonb,
scheduled_at timestamp with time zone,
finished_at timestamp with time zone,
error text,
error_event smallint,
error_backtrace text[],
process_id uuid,
duration interval
);
CREATE TABLE good_job_processes (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
state jsonb,
lock_type smallint
);
CREATE TABLE good_job_settings (
id uuid DEFAULT gen_random_uuid() NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
key text,
value jsonb
);
CREATE TABLE good_jobs (
id uuid DEFAULT gen_random_uuid() NOT NULL,
queue_name text,
priority integer,
serialized_params jsonb,
scheduled_at timestamp with time zone,
performed_at timestamp with time zone,
finished_at timestamp with time zone,
error text,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
active_job_id uuid,
concurrency_key text,
cron_key text,
retried_good_job_id uuid,
cron_at timestamp with time zone,
batch_id uuid,
batch_callback_id uuid,
is_discrete boolean,
executions_count integer,
job_class text,
error_event smallint,
labels text[],
locked_by_id uuid,
locked_at timestamp with time zone
);
CREATE TABLE namespace_licenses (
id bigint NOT NULL,
data text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
namespace_id bigint NOT NULL
);
CREATE SEQUENCE namespace_licenses_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE namespace_licenses_id_seq OWNED BY namespace_licenses.id;
CREATE TABLE namespace_member_roles (
id bigint NOT NULL,
role_id bigint NOT NULL,
member_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE namespace_member_roles_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE namespace_member_roles_id_seq OWNED BY namespace_member_roles.id;
CREATE TABLE namespace_members (
id bigint NOT NULL,
user_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
namespace_id bigint NOT NULL
);
CREATE SEQUENCE namespace_members_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE namespace_members_id_seq OWNED BY namespace_members.id;
CREATE TABLE namespace_project_runtime_assignments (
id bigint NOT NULL,
runtime_id bigint NOT NULL,
namespace_project_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
compatible boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE namespace_project_runtime_assignments_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE namespace_project_runtime_assignments_id_seq OWNED BY namespace_project_runtime_assignments.id;
CREATE TABLE namespace_projects (
id bigint NOT NULL,
name text NOT NULL,
description text DEFAULT ''::text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
namespace_id bigint NOT NULL,
primary_runtime_id bigint,
slug text NOT NULL,
CONSTRAINT check_09e881e641 CHECK ((char_length(name) <= 50)),
CONSTRAINT check_34f7fad2d8 CHECK ((char_length(slug) <= 50)),
CONSTRAINT check_a77bf7c685 CHECK ((char_length(description) <= 500))
);
CREATE SEQUENCE namespace_projects_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE namespace_projects_id_seq OWNED BY namespace_projects.id;
CREATE TABLE namespace_role_abilities (
id bigint NOT NULL,
ability integer NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
namespace_role_id bigint NOT NULL
);
CREATE SEQUENCE namespace_role_abilities_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE namespace_role_abilities_id_seq OWNED BY namespace_role_abilities.id;
CREATE TABLE namespace_role_project_assignments (
id bigint NOT NULL,
role_id bigint NOT NULL,
project_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE namespace_role_project_assignments_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE namespace_role_project_assignments_id_seq OWNED BY namespace_role_project_assignments.id;
CREATE TABLE namespace_roles (
id bigint NOT NULL,
name text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
namespace_id bigint NOT NULL
);
CREATE SEQUENCE namespace_roles_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE namespace_roles_id_seq OWNED BY namespace_roles.id;
CREATE TABLE namespaces (
id bigint NOT NULL,
parent_type character varying NOT NULL,
parent_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE namespaces_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE namespaces_id_seq OWNED BY namespaces.id;
CREATE TABLE node_functions (
id bigint NOT NULL,
next_node_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
flow_id bigint NOT NULL,
function_definition_id bigint NOT NULL
);
CREATE SEQUENCE node_functions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE node_functions_id_seq OWNED BY node_functions.id;
CREATE TABLE node_parameters (
id bigint NOT NULL,
node_function_id bigint NOT NULL,
literal_value jsonb,
reference_value_id bigint,
function_value_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
parameter_definition_id bigint NOT NULL,
CONSTRAINT check_46b42221bc CHECK ((num_nonnulls(literal_value, reference_value_id, function_value_id) <= 1))
);
CREATE SEQUENCE node_parameters_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE node_parameters_id_seq OWNED BY node_parameters.id;
CREATE TABLE organizations (
id bigint NOT NULL,
name text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
CONSTRAINT check_d130d769e0 CHECK ((char_length(name) <= 50))
);
CREATE SEQUENCE organizations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE organizations_id_seq OWNED BY organizations.id;
CREATE TABLE parameter_definitions (
id bigint NOT NULL,
runtime_parameter_definition_id bigint NOT NULL,
default_value jsonb,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
data_type_id bigint,
function_definition_id bigint NOT NULL
);
CREATE SEQUENCE parameter_definitions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE parameter_definitions_id_seq OWNED BY parameter_definitions.id;
CREATE TABLE reference_paths (
id bigint NOT NULL,
path text,
array_index integer,
reference_value_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE reference_paths_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE reference_paths_id_seq OWNED BY reference_paths.id;
CREATE TABLE reference_values (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
node_function_id bigint NOT NULL
);
CREATE SEQUENCE reference_values_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE reference_values_id_seq OWNED BY reference_values.id;
CREATE TABLE runtime_function_definitions (
id bigint NOT NULL,
runtime_id bigint NOT NULL,
runtime_name text NOT NULL,
throws_error boolean DEFAULT true NOT NULL,
removed_at timestamp with time zone,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
return_type_id bigint,
generic_keys text[] DEFAULT '{}'::text[] NOT NULL,
version text NOT NULL,
CONSTRAINT check_fe8fff4f27 CHECK ((char_length(runtime_name) <= 50))
);
CREATE SEQUENCE runtime_function_definitions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE runtime_function_definitions_id_seq OWNED BY runtime_function_definitions.id;
CREATE TABLE runtime_parameter_definitions (
id bigint NOT NULL,
runtime_function_definition_id bigint NOT NULL,
runtime_name text NOT NULL,
removed_at timestamp with time zone,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
default_value jsonb,
data_type_id bigint,
CONSTRAINT check_c1156ce358 CHECK ((char_length(runtime_name) <= 50))
);
CREATE SEQUENCE runtime_parameter_definitions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE runtime_parameter_definitions_id_seq OWNED BY runtime_parameter_definitions.id;
CREATE TABLE runtimes (
id bigint NOT NULL,
name text NOT NULL,
description text DEFAULT ''::text NOT NULL,
token text NOT NULL,
namespace_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
status integer DEFAULT 0 NOT NULL,
CONSTRAINT check_090cd49d30 CHECK ((char_length(name) <= 50)),
CONSTRAINT check_f3c2ba8db3 CHECK ((char_length(description) <= 500))
);
CREATE SEQUENCE runtimes_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE runtimes_id_seq OWNED BY runtimes.id;
CREATE TABLE schema_migrations (
version character varying NOT NULL
);
CREATE TABLE translations (
id bigint NOT NULL,
code text NOT NULL,
content text NOT NULL,
owner_type character varying NOT NULL,
owner_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
purpose text
);
CREATE SEQUENCE translations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE translations_id_seq OWNED BY translations.id;
CREATE TABLE user_identities (
id bigint NOT NULL,
user_id bigint NOT NULL,
provider_id text NOT NULL,
identifier text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE user_identities_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE user_identities_id_seq OWNED BY user_identities.id;
CREATE TABLE user_sessions (
id bigint NOT NULL,
user_id bigint NOT NULL,
token text NOT NULL,
active boolean DEFAULT true NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE user_sessions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE user_sessions_id_seq OWNED BY user_sessions.id;
CREATE TABLE users (
id bigint NOT NULL,
username text,
email text,
password_digest text NOT NULL,
firstname text,
lastname text,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
admin boolean DEFAULT false NOT NULL,
totp_secret text,
email_verified_at timestamp with time zone,
CONSTRAINT check_3bedaaa612 CHECK ((char_length(email) <= 255)),
CONSTRAINT check_56606ce552 CHECK ((char_length(username) <= 50)),
CONSTRAINT check_60346c5299 CHECK ((char_length(lastname) <= 50)),
CONSTRAINT check_d4bc21c175 CHECK ((char_length(firstname) <= 50))
);
CREATE SEQUENCE users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE users_id_seq OWNED BY users.id;
ALTER TABLE ONLY active_storage_attachments ALTER COLUMN id SET DEFAULT nextval('active_storage_attachments_id_seq'::regclass);
ALTER TABLE ONLY active_storage_blobs ALTER COLUMN id SET DEFAULT nextval('active_storage_blobs_id_seq'::regclass);
ALTER TABLE ONLY active_storage_variant_records ALTER COLUMN id SET DEFAULT nextval('active_storage_variant_records_id_seq'::regclass);
ALTER TABLE ONLY application_settings ALTER COLUMN id SET DEFAULT nextval('application_settings_id_seq'::regclass);
ALTER TABLE ONLY audit_events ALTER COLUMN id SET DEFAULT nextval('audit_events_id_seq'::regclass);
ALTER TABLE ONLY backup_codes ALTER COLUMN id SET DEFAULT nextval('backup_codes_id_seq'::regclass);
ALTER TABLE ONLY data_type_identifiers ALTER COLUMN id SET DEFAULT nextval('data_type_identifiers_id_seq'::regclass);
ALTER TABLE ONLY data_type_rules ALTER COLUMN id SET DEFAULT nextval('data_type_rules_id_seq'::regclass);
ALTER TABLE ONLY data_types ALTER COLUMN id SET DEFAULT nextval('data_types_id_seq'::regclass);
ALTER TABLE ONLY flow_settings ALTER COLUMN id SET DEFAULT nextval('flow_settings_id_seq'::regclass);
ALTER TABLE ONLY flow_type_settings ALTER COLUMN id SET DEFAULT nextval('flow_type_settings_id_seq'::regclass);
ALTER TABLE ONLY flow_types ALTER COLUMN id SET DEFAULT nextval('flow_types_id_seq'::regclass);
ALTER TABLE ONLY flows ALTER COLUMN id SET DEFAULT nextval('flows_id_seq'::regclass);
ALTER TABLE ONLY function_definitions ALTER COLUMN id SET DEFAULT nextval('function_definitions_id_seq'::regclass);
ALTER TABLE ONLY generic_combination_strategies ALTER COLUMN id SET DEFAULT nextval('generic_combination_strategies_id_seq'::regclass);
ALTER TABLE ONLY generic_mappers ALTER COLUMN id SET DEFAULT nextval('generic_mappers_id_seq'::regclass);
ALTER TABLE ONLY generic_types ALTER COLUMN id SET DEFAULT nextval('generic_types_id_seq'::regclass);
ALTER TABLE ONLY namespace_licenses ALTER COLUMN id SET DEFAULT nextval('namespace_licenses_id_seq'::regclass);
ALTER TABLE ONLY namespace_member_roles ALTER COLUMN id SET DEFAULT nextval('namespace_member_roles_id_seq'::regclass);
ALTER TABLE ONLY namespace_members ALTER COLUMN id SET DEFAULT nextval('namespace_members_id_seq'::regclass);
ALTER TABLE ONLY namespace_project_runtime_assignments ALTER COLUMN id SET DEFAULT nextval('namespace_project_runtime_assignments_id_seq'::regclass);
ALTER TABLE ONLY namespace_projects ALTER COLUMN id SET DEFAULT nextval('namespace_projects_id_seq'::regclass);
ALTER TABLE ONLY namespace_role_abilities ALTER COLUMN id SET DEFAULT nextval('namespace_role_abilities_id_seq'::regclass);
ALTER TABLE ONLY namespace_role_project_assignments ALTER COLUMN id SET DEFAULT nextval('namespace_role_project_assignments_id_seq'::regclass);
ALTER TABLE ONLY namespace_roles ALTER COLUMN id SET DEFAULT nextval('namespace_roles_id_seq'::regclass);
ALTER TABLE ONLY namespaces ALTER COLUMN id SET DEFAULT nextval('namespaces_id_seq'::regclass);
ALTER TABLE ONLY node_functions ALTER COLUMN id SET DEFAULT nextval('node_functions_id_seq'::regclass);
ALTER TABLE ONLY node_parameters ALTER COLUMN id SET DEFAULT nextval('node_parameters_id_seq'::regclass);
ALTER TABLE ONLY organizations ALTER COLUMN id SET DEFAULT nextval('organizations_id_seq'::regclass);
ALTER TABLE ONLY parameter_definitions ALTER COLUMN id SET DEFAULT nextval('parameter_definitions_id_seq'::regclass);
ALTER TABLE ONLY reference_paths ALTER COLUMN id SET DEFAULT nextval('reference_paths_id_seq'::regclass);
ALTER TABLE ONLY reference_values ALTER COLUMN id SET DEFAULT nextval('reference_values_id_seq'::regclass);
ALTER TABLE ONLY runtime_function_definitions ALTER COLUMN id SET DEFAULT nextval('runtime_function_definitions_id_seq'::regclass);
ALTER TABLE ONLY runtime_parameter_definitions ALTER COLUMN id SET DEFAULT nextval('runtime_parameter_definitions_id_seq'::regclass);
ALTER TABLE ONLY runtimes ALTER COLUMN id SET DEFAULT nextval('runtimes_id_seq'::regclass);
ALTER TABLE ONLY translations ALTER COLUMN id SET DEFAULT nextval('translations_id_seq'::regclass);
ALTER TABLE ONLY user_identities ALTER COLUMN id SET DEFAULT nextval('user_identities_id_seq'::regclass);
ALTER TABLE ONLY user_sessions ALTER COLUMN id SET DEFAULT nextval('user_sessions_id_seq'::regclass);
ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
ALTER TABLE ONLY active_storage_attachments
ADD CONSTRAINT active_storage_attachments_pkey PRIMARY KEY (id);
ALTER TABLE ONLY active_storage_blobs
ADD CONSTRAINT active_storage_blobs_pkey PRIMARY KEY (id);
ALTER TABLE ONLY active_storage_variant_records
ADD CONSTRAINT active_storage_variant_records_pkey PRIMARY KEY (id);
ALTER TABLE ONLY application_settings
ADD CONSTRAINT application_settings_pkey PRIMARY KEY (id);
ALTER TABLE ONLY ar_internal_metadata
ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
ALTER TABLE ONLY audit_events
ADD CONSTRAINT audit_events_pkey PRIMARY KEY (id);
ALTER TABLE ONLY backup_codes
ADD CONSTRAINT backup_codes_pkey PRIMARY KEY (id);
ALTER TABLE ONLY data_type_identifiers
ADD CONSTRAINT data_type_identifiers_pkey PRIMARY KEY (id);
ALTER TABLE ONLY data_type_rules
ADD CONSTRAINT data_type_rules_pkey PRIMARY KEY (id);
ALTER TABLE ONLY data_types
ADD CONSTRAINT data_types_pkey PRIMARY KEY (id);
ALTER TABLE ONLY flow_settings
ADD CONSTRAINT flow_settings_pkey PRIMARY KEY (id);
ALTER TABLE ONLY flow_type_settings
ADD CONSTRAINT flow_type_settings_pkey PRIMARY KEY (id);
ALTER TABLE ONLY flow_types
ADD CONSTRAINT flow_types_pkey PRIMARY KEY (id);
ALTER TABLE ONLY flows
ADD CONSTRAINT flows_pkey PRIMARY KEY (id);
ALTER TABLE ONLY function_definitions
ADD CONSTRAINT function_definitions_pkey PRIMARY KEY (id);
ALTER TABLE ONLY generic_combination_strategies
ADD CONSTRAINT generic_combination_strategies_pkey PRIMARY KEY (id);
ALTER TABLE ONLY generic_mappers
ADD CONSTRAINT generic_mappers_pkey PRIMARY KEY (id);
ALTER TABLE ONLY generic_types
ADD CONSTRAINT generic_types_pkey PRIMARY KEY (id);
ALTER TABLE ONLY good_job_batches
ADD CONSTRAINT good_job_batches_pkey PRIMARY KEY (id);
ALTER TABLE ONLY good_job_executions
ADD CONSTRAINT good_job_executions_pkey PRIMARY KEY (id);
ALTER TABLE ONLY good_job_processes
ADD CONSTRAINT good_job_processes_pkey PRIMARY KEY (id);
ALTER TABLE ONLY good_job_settings
ADD CONSTRAINT good_job_settings_pkey PRIMARY KEY (id);
ALTER TABLE ONLY good_jobs
ADD CONSTRAINT good_jobs_pkey PRIMARY KEY (id);
ALTER TABLE ONLY namespace_licenses
ADD CONSTRAINT namespace_licenses_pkey PRIMARY KEY (id);
ALTER TABLE ONLY namespace_member_roles
ADD CONSTRAINT namespace_member_roles_pkey PRIMARY KEY (id);
ALTER TABLE ONLY namespace_members
ADD CONSTRAINT namespace_members_pkey PRIMARY KEY (id);
ALTER TABLE ONLY namespace_project_runtime_assignments
ADD CONSTRAINT namespace_project_runtime_assignments_pkey PRIMARY KEY (id);
ALTER TABLE ONLY namespace_projects
ADD CONSTRAINT namespace_projects_pkey PRIMARY KEY (id);
ALTER TABLE ONLY namespace_role_abilities
ADD CONSTRAINT namespace_role_abilities_pkey PRIMARY KEY (id);