-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathstructure.sql
4813 lines (3124 loc) · 129 KB
/
structure.sql
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
--
-- PostgreSQL database dump
--
-- Dumped from database version 11.11 (Debian 11.11-1.pgdg90+1)
-- Dumped by pg_dump version 11.12
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: intarray; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS intarray WITH SCHEMA public;
--
-- Name: EXTENSION intarray; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION intarray IS 'functions, operators, and index support for 1-D arrays of integers';
--
-- Name: pg_stat_statements; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS pg_stat_statements WITH SCHEMA public;
--
-- Name: EXTENSION pg_stat_statements; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION pg_stat_statements IS 'track execution statistics of all SQL statements executed';
--
-- Name: pg_trgm; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS pg_trgm WITH SCHEMA public;
--
-- Name: EXTENSION pg_trgm; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION pg_trgm IS 'text similarity measurement and index searching based on trigrams';
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: access_control_lists; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.access_control_lists (
id integer NOT NULL,
user_group_id integer,
roles character varying[] DEFAULT '{}'::character varying[] NOT NULL,
resource_id integer,
resource_type character varying,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: access_control_lists_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.access_control_lists_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: access_control_lists_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.access_control_lists_id_seq OWNED BY public.access_control_lists.id;
--
-- Name: aggregations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.aggregations (
id integer NOT NULL,
workflow_id integer,
subject_id integer,
aggregation jsonb DEFAULT '{}'::jsonb NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: aggregations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.aggregations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: aggregations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.aggregations_id_seq OWNED BY public.aggregations.id;
--
-- Name: authorizations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.authorizations (
id integer NOT NULL,
user_id integer,
provider character varying,
uid character varying,
token character varying,
expires_at timestamp without time zone,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: authorizations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.authorizations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: authorizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.authorizations_id_seq OWNED BY public.authorizations.id;
--
-- Name: classification_subjects; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.classification_subjects (
classification_id integer NOT NULL,
subject_id integer NOT NULL
);
--
-- Name: classifications; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.classifications (
id integer NOT NULL,
project_id integer,
user_id integer,
workflow_id integer,
annotations jsonb DEFAULT '{}'::jsonb,
created_at timestamp without time zone,
updated_at timestamp without time zone,
user_group_id integer,
user_ip inet,
completed boolean DEFAULT true NOT NULL,
gold_standard boolean,
expert_classifier integer,
metadata jsonb DEFAULT '{}'::jsonb NOT NULL,
workflow_version text,
lifecycled_at timestamp without time zone
);
--
-- Name: classifications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.classifications_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: classifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.classifications_id_seq OWNED BY public.classifications.id;
--
-- Name: code_experiment_configs; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.code_experiment_configs (
id integer NOT NULL,
name character varying NOT NULL,
enabled_rate double precision DEFAULT 0.0 NOT NULL,
always_enabled_for_admins boolean DEFAULT true NOT NULL
);
--
-- Name: code_experiment_configs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.code_experiment_configs_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: code_experiment_configs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.code_experiment_configs_id_seq OWNED BY public.code_experiment_configs.id;
--
-- Name: collections; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.collections (
id integer NOT NULL,
name character varying,
created_at timestamp without time zone,
updated_at timestamp without time zone,
activated_state integer DEFAULT 0 NOT NULL,
display_name character varying,
private boolean DEFAULT true NOT NULL,
lock_version integer DEFAULT 0,
slug character varying DEFAULT ''::character varying,
favorite boolean DEFAULT false NOT NULL,
default_subject_id integer,
description text DEFAULT ''::text
);
--
-- Name: collections_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.collections_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: collections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.collections_id_seq OWNED BY public.collections.id;
--
-- Name: collections_projects; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.collections_projects (
collection_id integer NOT NULL,
project_id integer NOT NULL
);
--
-- Name: collections_subjects; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.collections_subjects (
subject_id integer NOT NULL,
collection_id integer NOT NULL,
id integer NOT NULL
);
--
-- Name: collections_subjects_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.collections_subjects_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: collections_subjects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.collections_subjects_id_seq OWNED BY public.collections_subjects.id;
--
-- Name: field_guide_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.field_guide_versions (
id integer NOT NULL,
field_guide_id integer NOT NULL,
items json,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: field_guide_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.field_guide_versions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: field_guide_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.field_guide_versions_id_seq OWNED BY public.field_guide_versions.id;
--
-- Name: field_guides; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.field_guides (
id integer NOT NULL,
items json DEFAULT '[]'::json,
language text,
project_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: field_guides_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.field_guides_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: field_guides_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.field_guides_id_seq OWNED BY public.field_guides.id;
--
-- Name: flipper_features; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.flipper_features (
id integer NOT NULL,
key character varying NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: flipper_features_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.flipper_features_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: flipper_features_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.flipper_features_id_seq OWNED BY public.flipper_features.id;
--
-- Name: flipper_gates; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.flipper_gates (
id integer NOT NULL,
feature_key character varying NOT NULL,
key character varying NOT NULL,
value character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: flipper_gates_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.flipper_gates_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: flipper_gates_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.flipper_gates_id_seq OWNED BY public.flipper_gates.id;
--
-- Name: gold_standard_annotations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.gold_standard_annotations (
id integer NOT NULL,
project_id integer,
workflow_id integer,
subject_id integer,
user_id integer,
classification_id integer,
annotations json NOT NULL,
metadata json NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: gold_standard_annotations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.gold_standard_annotations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: gold_standard_annotations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.gold_standard_annotations_id_seq OWNED BY public.gold_standard_annotations.id;
--
-- Name: media; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.media (
id integer NOT NULL,
type character varying,
linked_id integer,
linked_type character varying,
content_type character varying,
src text,
path_opts text[] DEFAULT '{}'::text[],
private boolean DEFAULT false,
external_link boolean DEFAULT false,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
metadata jsonb,
put_expires integer,
get_expires integer,
content_disposition character varying
);
--
-- Name: media_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.media_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: media_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.media_id_seq OWNED BY public.media.id;
--
-- Name: memberships; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.memberships (
id integer NOT NULL,
state integer DEFAULT 2 NOT NULL,
user_group_id integer,
user_id integer,
created_at timestamp without time zone,
updated_at timestamp without time zone,
roles character varying[] DEFAULT '{group_member}'::character varying[] NOT NULL,
identity boolean DEFAULT false NOT NULL
);
--
-- Name: memberships_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.memberships_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: memberships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.memberships_id_seq OWNED BY public.memberships.id;
--
-- Name: oauth_access_grants; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.oauth_access_grants (
id integer NOT NULL,
resource_owner_id integer NOT NULL,
application_id integer NOT NULL,
token character varying NOT NULL,
expires_in integer NOT NULL,
redirect_uri text NOT NULL,
created_at timestamp without time zone NOT NULL,
revoked_at timestamp without time zone,
scopes character varying
);
--
-- Name: oauth_access_grants_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.oauth_access_grants_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: oauth_access_grants_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.oauth_access_grants_id_seq OWNED BY public.oauth_access_grants.id;
--
-- Name: oauth_access_tokens; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.oauth_access_tokens (
id integer NOT NULL,
resource_owner_id integer,
application_id integer,
token text NOT NULL,
refresh_token character varying,
expires_in integer,
revoked_at timestamp without time zone,
created_at timestamp without time zone NOT NULL,
scopes character varying,
previous_refresh_token character varying
);
--
-- Name: oauth_access_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.oauth_access_tokens_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: oauth_access_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.oauth_access_tokens_id_seq OWNED BY public.oauth_access_tokens.id;
--
-- Name: oauth_applications; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.oauth_applications (
id integer NOT NULL,
name character varying NOT NULL,
uid character varying NOT NULL,
secret character varying NOT NULL,
redirect_uri text NOT NULL,
created_at timestamp without time zone,
updated_at timestamp without time zone,
owner_id integer,
owner_type character varying,
trust_level integer DEFAULT 1 NOT NULL,
default_scope character varying[] DEFAULT '{}'::character varying[],
scopes character varying DEFAULT ''::character varying NOT NULL,
confidential boolean DEFAULT true NOT NULL
);
--
-- Name: oauth_applications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.oauth_applications_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: oauth_applications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.oauth_applications_id_seq OWNED BY public.oauth_applications.id;
--
-- Name: organization_contents; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.organization_contents (
id integer NOT NULL,
title character varying NOT NULL,
description character varying NOT NULL,
introduction text DEFAULT ''::text,
language character varying NOT NULL,
organization_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
url_labels jsonb DEFAULT '{}'::jsonb,
announcement character varying DEFAULT ''::character varying
);
--
-- Name: organization_contents_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.organization_contents_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: organization_contents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.organization_contents_id_seq OWNED BY public.organization_contents.id;
--
-- Name: organization_page_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.organization_page_versions (
id integer NOT NULL,
organization_page_id integer NOT NULL,
title text,
content text,
url_key character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: organization_page_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.organization_page_versions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: organization_page_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.organization_page_versions_id_seq OWNED BY public.organization_page_versions.id;
--
-- Name: organization_pages; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.organization_pages (
id integer NOT NULL,
url_key character varying,
title text,
language character varying,
content text,
organization_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: organization_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.organization_pages_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: organization_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.organization_pages_id_seq OWNED BY public.organization_pages.id;
--
-- Name: organization_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.organization_versions (
id integer NOT NULL,
organization_id integer NOT NULL,
display_name character varying,
description character varying,
introduction text,
urls jsonb,
url_labels jsonb,
announcement character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: organization_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.organization_versions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: organization_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.organization_versions_id_seq OWNED BY public.organization_versions.id;
--
-- Name: organizations; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.organizations (
id integer NOT NULL,
display_name character varying,
slug character varying DEFAULT ''::character varying,
primary_language character varying NOT NULL,
listed_at timestamp without time zone,
activated_state integer DEFAULT 0 NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
urls jsonb DEFAULT '[]'::jsonb,
listed boolean DEFAULT false NOT NULL,
categories character varying[] DEFAULT '{}'::character varying[],
description character varying,
introduction text,
url_labels jsonb,
announcement character varying
);
--
-- Name: organizations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.organizations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: organizations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.organizations_id_seq OWNED BY public.organizations.id;
--
-- Name: project_contents; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.project_contents (
id integer NOT NULL,
project_id integer,
language character varying,
title character varying DEFAULT ''::character varying,
description text DEFAULT ''::text,
created_at timestamp without time zone,
updated_at timestamp without time zone,
introduction text DEFAULT ''::text,
url_labels jsonb DEFAULT '{}'::jsonb,
workflow_description text DEFAULT ''::text,
researcher_quote text DEFAULT ''::text
);
--
-- Name: project_contents_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.project_contents_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: project_contents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.project_contents_id_seq OWNED BY public.project_contents.id;
--
-- Name: project_page_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.project_page_versions (
id integer NOT NULL,
project_page_id integer NOT NULL,
title text,
content text,
url_key character varying,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: project_page_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.project_page_versions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: project_page_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.project_page_versions_id_seq OWNED BY public.project_page_versions.id;
--
-- Name: project_pages; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.project_pages (
id integer NOT NULL,
url_key character varying,
title text,
language character varying,
content text,
project_id integer,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL
);
--
-- Name: project_pages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.project_pages_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: project_pages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.project_pages_id_seq OWNED BY public.project_pages.id;
--
-- Name: project_versions; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.project_versions (
id integer NOT NULL,
project_id integer,
private boolean,
live boolean NOT NULL,
beta_requested boolean,
beta_approved boolean,
launch_requested boolean,
launch_approved boolean,
display_name character varying,
description text,
introduction text,
url_labels jsonb,
workflow_description text,
researcher_quote text,
created_at timestamp without time zone,
updated_at timestamp without time zone
);