diff options
Diffstat (limited to 'db/structure.sql')
-rw-r--r-- | db/structure.sql | 202 |
1 files changed, 132 insertions, 70 deletions
diff --git a/db/structure.sql b/db/structure.sql index 1b129381081..158ac90945a 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -173,7 +173,8 @@ CREATE TABLE analytics_cycle_analytics_issue_stage_events ( milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ) PARTITION BY HASH (stage_event_hash_id); @@ -185,7 +186,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_00 FOR VALUES WITH (modulus 32, remainder 0); @@ -197,7 +199,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_01 FOR VALUES WITH (modulus 32, remainder 1); @@ -209,7 +212,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_02 FOR VALUES WITH (modulus 32, remainder 2); @@ -221,7 +225,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_03 FOR VALUES WITH (modulus 32, remainder 3); @@ -233,7 +238,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_04 FOR VALUES WITH (modulus 32, remainder 4); @@ -245,7 +251,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_05 FOR VALUES WITH (modulus 32, remainder 5); @@ -257,7 +264,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_06 FOR VALUES WITH (modulus 32, remainder 6); @@ -269,7 +277,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_07 FOR VALUES WITH (modulus 32, remainder 7); @@ -281,7 +290,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_08 FOR VALUES WITH (modulus 32, remainder 8); @@ -293,7 +303,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_09 FOR VALUES WITH (modulus 32, remainder 9); @@ -305,7 +316,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_10 FOR VALUES WITH (modulus 32, remainder 10); @@ -317,7 +329,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_11 FOR VALUES WITH (modulus 32, remainder 11); @@ -329,7 +342,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_12 FOR VALUES WITH (modulus 32, remainder 12); @@ -341,7 +355,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_13 FOR VALUES WITH (modulus 32, remainder 13); @@ -353,7 +368,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_14 FOR VALUES WITH (modulus 32, remainder 14); @@ -365,7 +381,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_15 FOR VALUES WITH (modulus 32, remainder 15); @@ -377,7 +394,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_16 FOR VALUES WITH (modulus 32, remainder 16); @@ -389,7 +407,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_17 FOR VALUES WITH (modulus 32, remainder 17); @@ -401,7 +420,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_18 FOR VALUES WITH (modulus 32, remainder 18); @@ -413,7 +433,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_19 FOR VALUES WITH (modulus 32, remainder 19); @@ -425,7 +446,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_20 FOR VALUES WITH (modulus 32, remainder 20); @@ -437,7 +459,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_21 FOR VALUES WITH (modulus 32, remainder 21); @@ -449,7 +472,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_22 FOR VALUES WITH (modulus 32, remainder 22); @@ -461,7 +485,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_23 FOR VALUES WITH (modulus 32, remainder 23); @@ -473,7 +498,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_24 FOR VALUES WITH (modulus 32, remainder 24); @@ -485,7 +511,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_25 FOR VALUES WITH (modulus 32, remainder 25); @@ -497,7 +524,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_26 FOR VALUES WITH (modulus 32, remainder 26); @@ -509,7 +537,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_27 FOR VALUES WITH (modulus 32, remainder 27); @@ -521,7 +550,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_28 FOR VALUES WITH (modulus 32, remainder 28); @@ -533,7 +563,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_29 FOR VALUES WITH (modulus 32, remainder 29); @@ -545,7 +576,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_30 FOR VALUES WITH (modulus 32, remainder 30); @@ -557,7 +589,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_issue_stage_even milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_issue_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_issue_stage_events_31 FOR VALUES WITH (modulus 32, remainder 31); @@ -569,7 +602,8 @@ CREATE TABLE analytics_cycle_analytics_merge_request_stage_events ( milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ) PARTITION BY HASH (stage_event_hash_id); @@ -581,7 +615,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_00 FOR VALUES WITH (modulus 32, remainder 0); @@ -593,7 +628,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_01 FOR VALUES WITH (modulus 32, remainder 1); @@ -605,7 +641,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_02 FOR VALUES WITH (modulus 32, remainder 2); @@ -617,7 +654,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_03 FOR VALUES WITH (modulus 32, remainder 3); @@ -629,7 +667,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_04 FOR VALUES WITH (modulus 32, remainder 4); @@ -641,7 +680,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_05 FOR VALUES WITH (modulus 32, remainder 5); @@ -653,7 +693,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_06 FOR VALUES WITH (modulus 32, remainder 6); @@ -665,7 +706,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_07 FOR VALUES WITH (modulus 32, remainder 7); @@ -677,7 +719,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_08 FOR VALUES WITH (modulus 32, remainder 8); @@ -689,7 +732,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_09 FOR VALUES WITH (modulus 32, remainder 9); @@ -701,7 +745,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_10 FOR VALUES WITH (modulus 32, remainder 10); @@ -713,7 +758,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_11 FOR VALUES WITH (modulus 32, remainder 11); @@ -725,7 +771,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_12 FOR VALUES WITH (modulus 32, remainder 12); @@ -737,7 +784,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_13 FOR VALUES WITH (modulus 32, remainder 13); @@ -749,7 +797,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_14 FOR VALUES WITH (modulus 32, remainder 14); @@ -761,7 +810,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_15 FOR VALUES WITH (modulus 32, remainder 15); @@ -773,7 +823,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_16 FOR VALUES WITH (modulus 32, remainder 16); @@ -785,7 +836,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_17 FOR VALUES WITH (modulus 32, remainder 17); @@ -797,7 +849,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_18 FOR VALUES WITH (modulus 32, remainder 18); @@ -809,7 +862,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_19 FOR VALUES WITH (modulus 32, remainder 19); @@ -821,7 +875,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_20 FOR VALUES WITH (modulus 32, remainder 20); @@ -833,7 +888,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_21 FOR VALUES WITH (modulus 32, remainder 21); @@ -845,7 +901,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_22 FOR VALUES WITH (modulus 32, remainder 22); @@ -857,7 +914,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_23 FOR VALUES WITH (modulus 32, remainder 23); @@ -869,7 +927,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_24 FOR VALUES WITH (modulus 32, remainder 24); @@ -881,7 +940,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_25 FOR VALUES WITH (modulus 32, remainder 25); @@ -893,7 +953,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_26 FOR VALUES WITH (modulus 32, remainder 26); @@ -905,7 +966,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_27 FOR VALUES WITH (modulus 32, remainder 27); @@ -917,7 +979,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_28 FOR VALUES WITH (modulus 32, remainder 28); @@ -929,7 +992,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_29 FOR VALUES WITH (modulus 32, remainder 29); @@ -941,7 +1005,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_30 FOR VALUES WITH (modulus 32, remainder 30); @@ -953,7 +1018,8 @@ CREATE TABLE gitlab_partitions_static.analytics_cycle_analytics_merge_request_st milestone_id bigint, author_id bigint, start_event_timestamp timestamp with time zone NOT NULL, - end_event_timestamp timestamp with time zone + end_event_timestamp timestamp with time zone, + state_id smallint DEFAULT 1 NOT NULL ); ALTER TABLE ONLY analytics_cycle_analytics_merge_request_stage_events ATTACH PARTITION gitlab_partitions_static.analytics_cycle_analytics_merge_request_stage_events_31 FOR VALUES WITH (modulus 32, remainder 31); @@ -15851,10 +15917,6 @@ CREATE TABLE merge_request_diff_commits ( merge_request_diff_id integer NOT NULL, relative_order integer NOT NULL, sha bytea NOT NULL, - author_name text, - author_email text, - committer_name text, - committer_email text, message text, trailers jsonb DEFAULT '{}'::jsonb NOT NULL, commit_author_id bigint, |