-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructure.sql
More file actions
1933 lines (1458 loc) · 72.8 KB
/
Copy pathstructure.sql
File metadata and controls
1933 lines (1458 loc) · 72.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 bigint NOT NULL,
entity_type text NOT NULL,
action_type integer NOT NULL,
details jsonb NOT NULL,
ip_address inet,
target_id bigint 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_data_type_links (
id bigint NOT NULL,
data_type_id bigint NOT NULL,
referenced_data_type_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE data_type_data_type_links_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE data_type_data_type_links_id_seq OWNED BY data_type_data_type_links.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,
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,
version text NOT NULL,
type text NOT NULL,
definition_source text,
runtime_module_id bigint NOT NULL,
CONSTRAINT check_01ca31b7b9 CHECK ((char_length(type) <= 65536)),
CONSTRAINT check_3a7198812e CHECK ((char_length(identifier) <= 50)),
CONSTRAINT check_a133157a46 CHECK ((char_length(definition_source) <= 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 execution_node_results (
id bigint NOT NULL,
execution_result_id bigint NOT NULL,
node_function_id bigint,
"position" integer NOT NULL,
started_at bigint NOT NULL,
finished_at bigint NOT NULL,
success jsonb,
error jsonb,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
function_definition_id bigint,
CONSTRAINT check_26548a5903 CHECK ((num_nonnulls(success, error) <= 1))
);
CREATE SEQUENCE execution_node_results_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE execution_node_results_id_seq OWNED BY execution_node_results.id;
CREATE TABLE execution_parameter_results (
id bigint NOT NULL,
execution_node_result_id bigint NOT NULL,
"position" integer NOT NULL,
value jsonb,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE execution_parameter_results_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE execution_parameter_results_id_seq OWNED BY execution_parameter_results.id;
CREATE TABLE execution_results (
id bigint NOT NULL,
flow_id bigint NOT NULL,
execution_identifier text NOT NULL,
input jsonb,
started_at bigint NOT NULL,
finished_at bigint NOT NULL,
success jsonb,
error jsonb,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
CONSTRAINT check_1e7a71dfb7 CHECK ((char_length(execution_identifier) <= 200)),
CONSTRAINT check_5bf29caaec CHECK ((num_nonnulls(success, error) <= 1))
);
CREATE SEQUENCE execution_results_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE execution_results_id_seq OWNED BY execution_results.id;
CREATE TABLE flow_data_type_links (
id bigint NOT NULL,
flow_id bigint NOT NULL,
referenced_data_type_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE flow_data_type_links_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE flow_data_type_links_id_seq OWNED BY flow_data_type_links.id;
CREATE TABLE flow_settings (
id bigint NOT NULL,
flow_id bigint NOT NULL,
flow_setting_id text NOT NULL,
object jsonb,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
"cast" text,
CONSTRAINT check_65f98666ae CHECK ((char_length("cast") <= 500))
);
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_data_type_links (
id bigint NOT NULL,
flow_type_id bigint NOT NULL,
referenced_data_type_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE flow_type_data_type_links_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE flow_type_data_type_links_id_seq OWNED BY flow_type_data_type_links.id;
CREATE TABLE flow_type_settings (
id bigint NOT NULL,
flow_type_id bigint NOT NULL,
identifier text 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,
removed_at timestamp with time zone,
optional boolean DEFAULT false NOT NULL,
hidden boolean DEFAULT false 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,
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,
signature text DEFAULT ''::text NOT NULL,
definition_source text,
display_icon text,
runtime_module_id bigint NOT NULL,
runtime_flow_type_id bigint NOT NULL,
CONSTRAINT check_3311b57eb7 CHECK ((char_length(definition_source) <= 50)),
CONSTRAINT check_3f33e69ae0 CHECK ((char_length(display_icon) <= 100)),
CONSTRAINT check_dfcfd661f1 CHECK ((char_length(signature) <= 500))
);
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,
starting_node_id bigint,
name text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
validation_status integer DEFAULT 0 NOT NULL,
disabled_reason integer,
signature text DEFAULT ''::text NOT NULL,
CONSTRAINT check_8c731c24ec CHECK ((char_length(signature) <= 500))
);
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,
runtime_module_id bigint NOT NULL,
identifier text NOT NULL,
removed_at timestamp with time zone,
runtime_id bigint NOT NULL,
design text,
CONSTRAINT check_0641c95c39 CHECK ((char_length(identifier) <= 50)),
CONSTRAINT check_8b4572b26a CHECK ((char_length(design) <= 200))
);
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 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,
lock_type integer
);
CREATE TABLE licenses (
id bigint CONSTRAINT organization_licenses_id_not_null NOT NULL,
data text CONSTRAINT organization_licenses_data_not_null NOT NULL,
created_at timestamp with time zone CONSTRAINT organization_licenses_created_at_not_null NOT NULL,
updated_at timestamp with time zone CONSTRAINT organization_licenses_updated_at_not_null NOT NULL,
namespace_id bigint
);
CREATE SEQUENCE licenses_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE licenses_id_seq OWNED BY licenses.id;
CREATE TABLE module_configuration_definition_data_type_links (
id bigint NOT NULL,
module_configuration_definition_id bigint CONSTRAINT module_configuration_defini_module_configuration_defin_not_null NOT NULL,
referenced_data_type_id bigint CONSTRAINT module_configuration_definitio_referenced_data_type_id_not_null NOT NULL,
created_at timestamp with time zone CONSTRAINT module_configuration_definition_data_type_l_created_at_not_null NOT NULL,
updated_at timestamp with time zone CONSTRAINT module_configuration_definition_data_type_l_updated_at_not_null NOT NULL
);
CREATE SEQUENCE module_configuration_definition_data_type_links_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE module_configuration_definition_data_type_links_id_seq OWNED BY module_configuration_definition_data_type_links.id;
CREATE TABLE module_configuration_definitions (
id bigint NOT NULL,
runtime_module_id bigint NOT NULL,
identifier text NOT NULL,
type text NOT NULL,
default_value jsonb,
optional boolean DEFAULT false NOT NULL,
hidden boolean DEFAULT false NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
CONSTRAINT check_7fe4a3bc1a CHECK ((char_length(type) <= 8192)),
CONSTRAINT check_b0290d44f1 CHECK ((char_length(identifier) <= 50))
);
CREATE SEQUENCE module_configuration_definitions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE module_configuration_definitions_id_seq OWNED BY module_configuration_definitions.id;
CREATE TABLE module_configurations (
id bigint NOT NULL,
namespace_project_runtime_assignment_id bigint CONSTRAINT module_configurations_namespace_project_runtime_assign_not_null NOT NULL,
module_configuration_definition_id bigint CONSTRAINT module_configurations_module_configuration_definition__not_null NOT NULL,
value jsonb,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE module_configurations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE module_configurations_id_seq OWNED BY module_configurations.id;
CREATE TABLE namespace_member_roles (
id bigint CONSTRAINT organization_member_roles_id_not_null NOT NULL,
role_id bigint CONSTRAINT organization_member_roles_role_id_not_null NOT NULL,
member_id bigint CONSTRAINT organization_member_roles_member_id_not_null NOT NULL,
created_at timestamp with time zone CONSTRAINT organization_member_roles_created_at_not_null NOT NULL,
updated_at timestamp with time zone CONSTRAINT organization_member_roles_updated_at_not_null 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 CONSTRAINT organization_members_id_not_null NOT NULL,
user_id bigint CONSTRAINT organization_members_user_id_not_null NOT NULL,
created_at timestamp with time zone CONSTRAINT organization_members_created_at_not_null NOT NULL,
updated_at timestamp with time zone CONSTRAINT organization_members_updated_at_not_null 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 CONSTRAINT namespace_project_runtime_assignm_namespace_project_id_not_null 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 CONSTRAINT organization_projects_id_not_null NOT NULL,
name text CONSTRAINT organization_projects_name_not_null NOT NULL,
description text DEFAULT ''::text CONSTRAINT organization_projects_description_not_null NOT NULL,
created_at timestamp with time zone CONSTRAINT organization_projects_created_at_not_null NOT NULL,
updated_at timestamp with time zone CONSTRAINT organization_projects_updated_at_not_null 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 CONSTRAINT organization_role_abilities_id_not_null NOT NULL,
ability integer CONSTRAINT organization_role_abilities_ability_not_null NOT NULL,
created_at timestamp with time zone CONSTRAINT organization_role_abilities_created_at_not_null NOT NULL,
updated_at timestamp with time zone CONSTRAINT organization_role_abilities_updated_at_not_null 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 CONSTRAINT organization_roles_id_not_null NOT NULL,
name text CONSTRAINT organization_roles_name_not_null NOT NULL,
created_at timestamp with time zone CONSTRAINT organization_roles_created_at_not_null NOT NULL,
updated_at timestamp with time zone CONSTRAINT organization_roles_updated_at_not_null 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,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
parameter_definition_id bigint NOT NULL,
"cast" text,
CONSTRAINT check_6439c80497 CHECK ((char_length("cast") <= 500))
);
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,
function_definition_id bigint NOT NULL,
optional boolean DEFAULT false NOT NULL,
hidden boolean DEFAULT false 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,
parameter_index integer,
input_index integer,
input_type_identifier text,
node_parameter_id bigint NOT NULL,
CONSTRAINT check_a2e3734389 CHECK ((num_nonnulls(parameter_index, input_index) = ANY (ARRAY[0, 2])))
);
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_flow_type_data_type_links (
id bigint NOT NULL,
runtime_flow_type_id bigint NOT NULL,
referenced_data_type_id bigint CONSTRAINT runtime_flow_type_data_type_li_referenced_data_type_id_not_null NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE runtime_flow_type_data_type_links_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE runtime_flow_type_data_type_links_id_seq OWNED BY runtime_flow_type_data_type_links.id;
CREATE TABLE runtime_flow_type_settings (
id bigint NOT NULL,
runtime_flow_type_id bigint NOT NULL,
identifier text NOT NULL,
"unique" integer DEFAULT 0 NOT NULL,
default_value jsonb,
removed_at timestamp with time zone,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
optional boolean DEFAULT false NOT NULL,
hidden boolean DEFAULT false NOT NULL
);
CREATE SEQUENCE runtime_flow_type_settings_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE runtime_flow_type_settings_id_seq OWNED BY runtime_flow_type_settings.id;
CREATE TABLE runtime_flow_types (
id bigint NOT NULL,
runtime_id bigint NOT NULL,
runtime_module_id bigint NOT NULL,
identifier text NOT NULL,
editable boolean DEFAULT false NOT NULL,
signature text DEFAULT ''::text NOT NULL,
removed_at timestamp with time zone,
definition_source text,
display_icon text,
version text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
CONSTRAINT check_0d21df63ce CHECK ((char_length(identifier) <= 50)),
CONSTRAINT check_a082764ff7 CHECK ((char_length(definition_source) <= 50)),
CONSTRAINT check_c63332f6d6 CHECK ((char_length(signature) <= 500)),
CONSTRAINT check_e4e6c481a3 CHECK ((char_length(display_icon) <= 100))
);
CREATE SEQUENCE runtime_flow_types_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE runtime_flow_types_id_seq OWNED BY runtime_flow_types.id;
CREATE TABLE runtime_function_definition_data_type_links (
id bigint NOT NULL,
runtime_function_definition_id bigint CONSTRAINT runtime_function_definition_runtime_function_definitio_not_null NOT NULL,
referenced_data_type_id bigint CONSTRAINT runtime_function_definition_da_referenced_data_type_id_not_null NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);
CREATE SEQUENCE runtime_function_definition_data_type_links_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE runtime_function_definition_data_type_links_id_seq OWNED BY runtime_function_definition_data_type_links.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,
version text NOT NULL,
signature text NOT NULL,
definition_source text,
display_icon text,
runtime_module_id bigint NOT NULL,
design text,
CONSTRAINT check_4cf530fb6a CHECK ((char_length(definition_source) <= 50)),
CONSTRAINT check_86da361565 CHECK ((char_length(signature) <= 500)),
CONSTRAINT check_b25f98a584 CHECK ((char_length(design) <= 200)),
CONSTRAINT check_ef62cf61e5 CHECK ((char_length(display_icon) <= 100)),
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_module_definitions (
id bigint NOT NULL,
runtime_module_id bigint NOT NULL,
host text NOT NULL,
port bigint NOT NULL,
endpoint text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
CONSTRAINT check_5328b69b6f CHECK ((char_length(host) <= 253)),
CONSTRAINT check_5a8231f609 CHECK ((char_length(endpoint) <= 2048))
);
CREATE SEQUENCE runtime_module_definitions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE runtime_module_definitions_id_seq OWNED BY runtime_module_definitions.id;
CREATE TABLE runtime_modules (
id bigint NOT NULL,
runtime_id bigint NOT NULL,
identifier text NOT NULL,
documentation text DEFAULT ''::text NOT NULL,
author text DEFAULT ''::text NOT NULL,
icon text,
version text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
CONSTRAINT check_1a843f8ec6 CHECK ((char_length(identifier) <= 50)),
CONSTRAINT check_3f8395fc6a CHECK ((char_length(icon) <= 100)),
CONSTRAINT check_59e12f7f02 CHECK ((char_length(author) <= 200)),
CONSTRAINT check_d169c23c07 CHECK ((char_length(documentation) <= 200))
);
CREATE SEQUENCE runtime_modules_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE runtime_modules_id_seq OWNED BY runtime_modules.id;
CREATE TABLE runtime_parameter_definitions (
id bigint NOT NULL,
runtime_function_definition_id bigint CONSTRAINT runtime_parameter_definitio_runtime_function_definitio_not_null 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,
optional boolean DEFAULT false NOT NULL,
hidden boolean DEFAULT false NOT NULL,
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 runtime_status_configurations (
id bigint NOT NULL,
runtime_status_id bigint NOT NULL,
endpoint text NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL
);