Commit 6d6e6cf4 authored by Alan (Maciej) Paruszewski's avatar Alan (Maciej) Paruszewski Committed by Adam Hegyi

Remove Clusters Applications Fluentd Table

Changelog: removed
parent bf3439f5
# frozen_string_literal: true
class RemoveClustersApplicationsFluentdTable < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
def up
drop_table :clusters_applications_fluentd
end
def down
create_table :clusters_applications_fluentd do |t|
t.integer :protocol, null: false, limit: 2
t.integer :status, null: false
t.integer :port, null: false
t.references :cluster, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade }
t.timestamps_with_timezone null: false
t.string :version, null: false, limit: 255
t.string :host, null: false, limit: 255
t.boolean :cilium_log_enabled, default: true, null: false
t.boolean :waf_log_enabled, default: true, null: false
t.text :status_reason # rubocop:disable Migration/AddLimitToTextColumns
end
end
end
f8b8276ed7e120b61f6748a328590a98f0e444e0d26bcb1a2b0daa54c3643acd
\ No newline at end of file
...@@ -11633,30 +11633,6 @@ CREATE SEQUENCE clusters_applications_elastic_stacks_id_seq ...@@ -11633,30 +11633,6 @@ CREATE SEQUENCE clusters_applications_elastic_stacks_id_seq
ALTER SEQUENCE clusters_applications_elastic_stacks_id_seq OWNED BY clusters_applications_elastic_stacks.id; ALTER SEQUENCE clusters_applications_elastic_stacks_id_seq OWNED BY clusters_applications_elastic_stacks.id;
CREATE TABLE clusters_applications_fluentd (
id bigint NOT NULL,
protocol smallint NOT NULL,
status integer NOT NULL,
port integer NOT NULL,
cluster_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
version character varying(255) NOT NULL,
host character varying(255) NOT NULL,
status_reason text,
waf_log_enabled boolean DEFAULT true NOT NULL,
cilium_log_enabled boolean DEFAULT true NOT NULL
);
CREATE SEQUENCE clusters_applications_fluentd_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE clusters_applications_fluentd_id_seq OWNED BY clusters_applications_fluentd.id;
CREATE TABLE clusters_applications_helm ( CREATE TABLE clusters_applications_helm (
id integer NOT NULL, id integer NOT NULL,
cluster_id integer NOT NULL, cluster_id integer NOT NULL,
...@@ -19817,8 +19793,6 @@ ALTER TABLE ONLY clusters_applications_crossplane ALTER COLUMN id SET DEFAULT ne ...@@ -19817,8 +19793,6 @@ ALTER TABLE ONLY clusters_applications_crossplane ALTER COLUMN id SET DEFAULT ne
ALTER TABLE ONLY clusters_applications_elastic_stacks ALTER COLUMN id SET DEFAULT nextval('clusters_applications_elastic_stacks_id_seq'::regclass); ALTER TABLE ONLY clusters_applications_elastic_stacks ALTER COLUMN id SET DEFAULT nextval('clusters_applications_elastic_stacks_id_seq'::regclass);
ALTER TABLE ONLY clusters_applications_fluentd ALTER COLUMN id SET DEFAULT nextval('clusters_applications_fluentd_id_seq'::regclass);
ALTER TABLE ONLY clusters_applications_helm ALTER COLUMN id SET DEFAULT nextval('clusters_applications_helm_id_seq'::regclass); ALTER TABLE ONLY clusters_applications_helm ALTER COLUMN id SET DEFAULT nextval('clusters_applications_helm_id_seq'::regclass);
ALTER TABLE ONLY clusters_applications_ingress ALTER COLUMN id SET DEFAULT nextval('clusters_applications_ingress_id_seq'::regclass); ALTER TABLE ONLY clusters_applications_ingress ALTER COLUMN id SET DEFAULT nextval('clusters_applications_ingress_id_seq'::regclass);
...@@ -21049,9 +21023,6 @@ ALTER TABLE ONLY clusters_applications_crossplane ...@@ -21049,9 +21023,6 @@ ALTER TABLE ONLY clusters_applications_crossplane
ALTER TABLE ONLY clusters_applications_elastic_stacks ALTER TABLE ONLY clusters_applications_elastic_stacks
ADD CONSTRAINT clusters_applications_elastic_stacks_pkey PRIMARY KEY (id); ADD CONSTRAINT clusters_applications_elastic_stacks_pkey PRIMARY KEY (id);
ALTER TABLE ONLY clusters_applications_fluentd
ADD CONSTRAINT clusters_applications_fluentd_pkey PRIMARY KEY (id);
ALTER TABLE ONLY clusters_applications_helm ALTER TABLE ONLY clusters_applications_helm
ADD CONSTRAINT clusters_applications_helm_pkey PRIMARY KEY (id); ADD CONSTRAINT clusters_applications_helm_pkey PRIMARY KEY (id);
...@@ -23100,8 +23071,6 @@ CREATE UNIQUE INDEX index_clusters_applications_crossplane_on_cluster_id ON clus ...@@ -23100,8 +23071,6 @@ CREATE UNIQUE INDEX index_clusters_applications_crossplane_on_cluster_id ON clus
CREATE UNIQUE INDEX index_clusters_applications_elastic_stacks_on_cluster_id ON clusters_applications_elastic_stacks USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_elastic_stacks_on_cluster_id ON clusters_applications_elastic_stacks USING btree (cluster_id);
CREATE UNIQUE INDEX index_clusters_applications_fluentd_on_cluster_id ON clusters_applications_fluentd USING btree (cluster_id);
CREATE UNIQUE INDEX index_clusters_applications_helm_on_cluster_id ON clusters_applications_helm USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_helm_on_cluster_id ON clusters_applications_helm USING btree (cluster_id);
CREATE UNIQUE INDEX index_clusters_applications_ingress_on_cluster_id ON clusters_applications_ingress USING btree (cluster_id); CREATE UNIQUE INDEX index_clusters_applications_ingress_on_cluster_id ON clusters_applications_ingress USING btree (cluster_id);
...@@ -26707,9 +26676,6 @@ ALTER TABLE ONLY security_orchestration_policy_configurations ...@@ -26707,9 +26676,6 @@ ALTER TABLE ONLY security_orchestration_policy_configurations
ALTER TABLE ONLY ci_resources ALTER TABLE ONLY ci_resources
ADD CONSTRAINT fk_rails_430336af2d FOREIGN KEY (resource_group_id) REFERENCES ci_resource_groups(id) ON DELETE CASCADE; ADD CONSTRAINT fk_rails_430336af2d FOREIGN KEY (resource_group_id) REFERENCES ci_resource_groups(id) ON DELETE CASCADE;
ALTER TABLE ONLY clusters_applications_fluentd
ADD CONSTRAINT fk_rails_4319b1dcd2 FOREIGN KEY (cluster_id) REFERENCES clusters(id) ON DELETE CASCADE;
ALTER TABLE ONLY batched_background_migration_jobs ALTER TABLE ONLY batched_background_migration_jobs
ADD CONSTRAINT fk_rails_432153b86d FOREIGN KEY (batched_background_migration_id) REFERENCES batched_background_migrations(id) ON DELETE CASCADE; ADD CONSTRAINT fk_rails_432153b86d FOREIGN KEY (batched_background_migration_id) REFERENCES batched_background_migrations(id) ON DELETE CASCADE;
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