Commit b237f836 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'cilium-cluster-application-migration' into 'master'

Add clusters_applications_cilium DB table

See merge request gitlab-org/gitlab!34601
parents 3f827ec7 db41c521
---
title: Add clusters_applications_cilium DB table
merge_request: 34601
author:
type: added
# frozen_string_literal: true
class CreateClustersApplicationsCilium < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
create_table :clusters_applications_cilium do |t|
t.references :cluster, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade }
t.timestamps_with_timezone null: false
t.integer :status, null: false
t.text :status_reason # rubocop:disable Migration/AddLimitToTextColumns
end
end
end
...@@ -1793,6 +1793,24 @@ CREATE SEQUENCE public.clusters_applications_cert_managers_id_seq ...@@ -1793,6 +1793,24 @@ CREATE SEQUENCE public.clusters_applications_cert_managers_id_seq
ALTER SEQUENCE public.clusters_applications_cert_managers_id_seq OWNED BY public.clusters_applications_cert_managers.id; ALTER SEQUENCE public.clusters_applications_cert_managers_id_seq OWNED BY public.clusters_applications_cert_managers.id;
CREATE TABLE public.clusters_applications_cilium (
id bigint NOT NULL,
cluster_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
status integer NOT NULL,
status_reason text
);
CREATE SEQUENCE public.clusters_applications_cilium_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.clusters_applications_cilium_id_seq OWNED BY public.clusters_applications_cilium.id;
CREATE TABLE public.clusters_applications_crossplane ( CREATE TABLE public.clusters_applications_crossplane (
id integer NOT NULL, id integer NOT NULL,
created_at timestamp with time zone NOT NULL, created_at timestamp with time zone NOT NULL,
...@@ -7659,6 +7677,8 @@ ALTER TABLE ONLY public.clusters ALTER COLUMN id SET DEFAULT nextval('public.clu ...@@ -7659,6 +7677,8 @@ ALTER TABLE ONLY public.clusters ALTER COLUMN id SET DEFAULT nextval('public.clu
ALTER TABLE ONLY public.clusters_applications_cert_managers ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_cert_managers_id_seq'::regclass); ALTER TABLE ONLY public.clusters_applications_cert_managers ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_cert_managers_id_seq'::regclass);
ALTER TABLE ONLY public.clusters_applications_cilium ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_cilium_id_seq'::regclass);
ALTER TABLE ONLY public.clusters_applications_crossplane ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_crossplane_id_seq'::regclass); ALTER TABLE ONLY public.clusters_applications_crossplane ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_crossplane_id_seq'::regclass);
ALTER TABLE ONLY public.clusters_applications_elastic_stacks ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_elastic_stacks_id_seq'::regclass); ALTER TABLE ONLY public.clusters_applications_elastic_stacks ALTER COLUMN id SET DEFAULT nextval('public.clusters_applications_elastic_stacks_id_seq'::regclass);
...@@ -8389,6 +8409,9 @@ ALTER TABLE ONLY public.cluster_providers_gcp ...@@ -8389,6 +8409,9 @@ ALTER TABLE ONLY public.cluster_providers_gcp
ALTER TABLE ONLY public.clusters_applications_cert_managers ALTER TABLE ONLY public.clusters_applications_cert_managers
ADD CONSTRAINT clusters_applications_cert_managers_pkey PRIMARY KEY (id); ADD CONSTRAINT clusters_applications_cert_managers_pkey PRIMARY KEY (id);
ALTER TABLE ONLY public.clusters_applications_cilium
ADD CONSTRAINT clusters_applications_cilium_pkey PRIMARY KEY (id);
ALTER TABLE ONLY public.clusters_applications_crossplane ALTER TABLE ONLY public.clusters_applications_crossplane
ADD CONSTRAINT clusters_applications_crossplane_pkey PRIMARY KEY (id); ADD CONSTRAINT clusters_applications_crossplane_pkey PRIMARY KEY (id);
...@@ -9712,6 +9735,8 @@ CREATE UNIQUE INDEX index_cluster_providers_gcp_on_cluster_id ON public.cluster_ ...@@ -9712,6 +9735,8 @@ CREATE UNIQUE INDEX index_cluster_providers_gcp_on_cluster_id ON public.cluster_
CREATE UNIQUE INDEX index_clusters_applications_cert_managers_on_cluster_id ON public.clusters_applications_cert_managers USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_cert_managers_on_cluster_id ON public.clusters_applications_cert_managers USING btree (cluster_id);
CREATE UNIQUE INDEX index_clusters_applications_cilium_on_cluster_id ON public.clusters_applications_cilium USING btree (cluster_id);
CREATE UNIQUE INDEX index_clusters_applications_crossplane_on_cluster_id ON public.clusters_applications_crossplane USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_crossplane_on_cluster_id ON public.clusters_applications_crossplane USING btree (cluster_id);
CREATE UNIQUE INDEX index_clusters_applications_elastic_stacks_on_cluster_id ON public.clusters_applications_elastic_stacks USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_elastic_stacks_on_cluster_id ON public.clusters_applications_elastic_stacks USING btree (cluster_id);
...@@ -12323,6 +12348,9 @@ ALTER TABLE ONLY public.issue_user_mentions ...@@ -12323,6 +12348,9 @@ ALTER TABLE ONLY public.issue_user_mentions
ALTER TABLE ONLY public.merge_request_assignees ALTER TABLE ONLY public.merge_request_assignees
ADD CONSTRAINT fk_rails_579d375628 FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE; ADD CONSTRAINT fk_rails_579d375628 FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
ALTER TABLE ONLY public.clusters_applications_cilium
ADD CONSTRAINT fk_rails_59dc12eea6 FOREIGN KEY (cluster_id) REFERENCES public.clusters(id) ON DELETE CASCADE;
ALTER TABLE ONLY public.analytics_cycle_analytics_group_stages ALTER TABLE ONLY public.analytics_cycle_analytics_group_stages
ADD CONSTRAINT fk_rails_5a22f40223 FOREIGN KEY (start_event_label_id) REFERENCES public.labels(id) ON DELETE CASCADE; ADD CONSTRAINT fk_rails_5a22f40223 FOREIGN KEY (start_event_label_id) REFERENCES public.labels(id) ON DELETE CASCADE;
...@@ -14105,6 +14133,7 @@ COPY "schema_migrations" (version) FROM STDIN; ...@@ -14105,6 +14133,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200615123055 20200615123055
20200615193524 20200615193524
20200615232735 20200615232735
20200615234047
20200616145031 20200616145031
20200617000757 20200617000757
20200617001001 20200617001001
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment