Commit 1aeea01f authored by Steve Abrams's avatar Steve Abrams

Merge branch 'pb-drop-partitioned-foreign-keys' into 'master'

Drop unused partitioned_foreign_keys table

See merge request gitlab-org/gitlab!82215
parents 641cda46 42913c5a
# frozen_string_literal: true
class DropPartitionedForeignKeys < Gitlab::Database::Migration[1.0]
def up
drop_table :partitioned_foreign_keys
end
def down
create_table :partitioned_foreign_keys do |t|
t.boolean :cascade_delete, null: false, default: true
t.text :from_table, null: false, limit: 63
t.text :from_column, null: false, limit: 63
t.text :to_table, null: false, limit: 63
t.text :to_column, null: false, limit: 63
t.index [:to_table, :from_table, :from_column], unique: true, name: :index_partitioned_foreign_keys_unique_index
end
end
end
b7090327d2638bbee6646e5ca5a8f8597d97631f10f997698b8a1c1b6329c106
\ No newline at end of file
...@@ -18497,28 +18497,6 @@ CREATE SEQUENCE pages_domains_id_seq ...@@ -18497,28 +18497,6 @@ CREATE SEQUENCE pages_domains_id_seq
ALTER SEQUENCE pages_domains_id_seq OWNED BY pages_domains.id; ALTER SEQUENCE pages_domains_id_seq OWNED BY pages_domains.id;
CREATE TABLE partitioned_foreign_keys (
id bigint NOT NULL,
cascade_delete boolean DEFAULT true NOT NULL,
from_table text NOT NULL,
from_column text NOT NULL,
to_table text NOT NULL,
to_column text NOT NULL,
CONSTRAINT check_2c2e02a62b CHECK ((char_length(from_column) <= 63)),
CONSTRAINT check_40738efb57 CHECK ((char_length(to_table) <= 63)),
CONSTRAINT check_741676d405 CHECK ((char_length(from_table) <= 63)),
CONSTRAINT check_7e98be694f CHECK ((char_length(to_column) <= 63))
);
CREATE SEQUENCE partitioned_foreign_keys_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE partitioned_foreign_keys_id_seq OWNED BY partitioned_foreign_keys.id;
CREATE TABLE path_locks ( CREATE TABLE path_locks (
id integer NOT NULL, id integer NOT NULL,
path character varying NOT NULL, path character varying NOT NULL,
...@@ -22862,8 +22840,6 @@ ALTER TABLE ONLY pages_domain_acme_orders ALTER COLUMN id SET DEFAULT nextval('p ...@@ -22862,8 +22840,6 @@ ALTER TABLE ONLY pages_domain_acme_orders ALTER COLUMN id SET DEFAULT nextval('p
ALTER TABLE ONLY pages_domains ALTER COLUMN id SET DEFAULT nextval('pages_domains_id_seq'::regclass); ALTER TABLE ONLY pages_domains ALTER COLUMN id SET DEFAULT nextval('pages_domains_id_seq'::regclass);
ALTER TABLE ONLY partitioned_foreign_keys ALTER COLUMN id SET DEFAULT nextval('partitioned_foreign_keys_id_seq'::regclass);
ALTER TABLE ONLY path_locks ALTER COLUMN id SET DEFAULT nextval('path_locks_id_seq'::regclass); ALTER TABLE ONLY path_locks ALTER COLUMN id SET DEFAULT nextval('path_locks_id_seq'::regclass);
ALTER TABLE ONLY personal_access_tokens ALTER COLUMN id SET DEFAULT nextval('personal_access_tokens_id_seq'::regclass); ALTER TABLE ONLY personal_access_tokens ALTER COLUMN id SET DEFAULT nextval('personal_access_tokens_id_seq'::regclass);
...@@ -24916,9 +24892,6 @@ ALTER TABLE ONLY pages_domain_acme_orders ...@@ -24916,9 +24892,6 @@ ALTER TABLE ONLY pages_domain_acme_orders
ALTER TABLE ONLY pages_domains ALTER TABLE ONLY pages_domains
ADD CONSTRAINT pages_domains_pkey PRIMARY KEY (id); ADD CONSTRAINT pages_domains_pkey PRIMARY KEY (id);
ALTER TABLE ONLY partitioned_foreign_keys
ADD CONSTRAINT partitioned_foreign_keys_pkey PRIMARY KEY (id);
ALTER TABLE ONLY path_locks ALTER TABLE ONLY path_locks
ADD CONSTRAINT path_locks_pkey PRIMARY KEY (id); ADD CONSTRAINT path_locks_pkey PRIMARY KEY (id);
...@@ -28509,8 +28482,6 @@ CREATE UNIQUE INDEX index_partial_am_alerts_on_project_id_and_fingerprint ON ale ...@@ -28509,8 +28482,6 @@ CREATE UNIQUE INDEX index_partial_am_alerts_on_project_id_and_fingerprint ON ale
CREATE INDEX index_partial_ci_builds_on_user_id_name_parser_features ON ci_builds USING btree (user_id, name) WHERE (((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('secret_detection'::character varying)::text]))); CREATE INDEX index_partial_ci_builds_on_user_id_name_parser_features ON ci_builds USING btree (user_id, name) WHERE (((type)::text = 'Ci::Build'::text) AND ((name)::text = ANY (ARRAY[('container_scanning'::character varying)::text, ('dast'::character varying)::text, ('dependency_scanning'::character varying)::text, ('license_management'::character varying)::text, ('license_scanning'::character varying)::text, ('sast'::character varying)::text, ('coverage_fuzzing'::character varying)::text, ('secret_detection'::character varying)::text])));
CREATE UNIQUE INDEX index_partitioned_foreign_keys_unique_index ON partitioned_foreign_keys USING btree (to_table, from_table, from_column);
CREATE INDEX index_pat_on_user_id_and_expires_at ON personal_access_tokens USING btree (user_id, expires_at); CREATE INDEX index_pat_on_user_id_and_expires_at ON personal_access_tokens USING btree (user_id, expires_at);
CREATE INDEX index_path_locks_on_path ON path_locks USING btree (path); CREATE INDEX index_path_locks_on_path ON path_locks USING btree (path);
...@@ -381,7 +381,6 @@ pages_deployments: :gitlab_main ...@@ -381,7 +381,6 @@ pages_deployments: :gitlab_main
pages_deployment_states: :gitlab_main pages_deployment_states: :gitlab_main
pages_domain_acme_orders: :gitlab_main pages_domain_acme_orders: :gitlab_main
pages_domains: :gitlab_main pages_domains: :gitlab_main
partitioned_foreign_keys: :gitlab_main
path_locks: :gitlab_main path_locks: :gitlab_main
personal_access_tokens: :gitlab_main personal_access_tokens: :gitlab_main
plan_limits: :gitlab_main plan_limits: :gitlab_main
......
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