Коммит 496df853 создал по автору Tiger Watson's avatar Tiger Watson
Просмотр файлов

Merge branch 'hustewart-drop-runners' into 'master'

Drop clusters_applications_runners table

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119540



Merged-by: default avatarTiger Watson <twatson@gitlab.com>
Approved-by: default avatarTiger Watson <twatson@gitlab.com>
Reviewed-by: default avatarTiger Watson <twatson@gitlab.com>
Co-authored-by: default avatarhustewart <hustewart@gitlab.com>
владельцы 173d5cc5 fb13afed
...@@ -184,10 +184,6 @@ ci_variables: ...@@ -184,10 +184,6 @@ ci_variables:
- table: projects - table: projects
column: project_id column: project_id
on_delete: async_delete on_delete: async_delete
clusters_applications_runners:
- table: ci_runners
column: runner_id
on_delete: async_nullify
dast_pre_scan_verifications: dast_pre_scan_verifications:
- table: ci_pipelines - table: ci_pipelines
column: ci_pipeline_id column: ci_pipeline_id
......
...@@ -6,3 +6,5 @@ description: "(Deprecated) A GitLab managed Runner installation in a Kubernetes ...@@ -6,3 +6,5 @@ description: "(Deprecated) A GitLab managed Runner installation in a Kubernetes
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/c607008ee55e35465e04a938a341f2f24cb6761f introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/commit/c607008ee55e35465e04a938a341f2f24cb6761f
milestone: '10.6' milestone: '10.6'
gitlab_schema: gitlab_main gitlab_schema: gitlab_main
removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119540
removed_in_milestone: '16.0'
# frozen_string_literal: true
# See https://docs.gitlab.com/ee/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class DropClustersApplicationsRunners < Gitlab::Database::Migration[2.1]
def up
drop_table :clusters_applications_runners
end
# Based on init schema:
# https://gitlab.com/gitlab-org/gitlab/-/blob/b237f836df215a4ada92b9406733e6cd2483ca2d/db/migrate/20181228175414_init_schema.rb#L752-L763
# rubocop:disable Migration/SchemaAdditionMethodsNoPost
def down
create_table "clusters_applications_runners", id: :serial, force: :cascade do |t|
t.integer "cluster_id", null: false
t.integer "runner_id"
t.integer "status", null: false
t.datetime_with_timezone "created_at", null: false
t.datetime_with_timezone "updated_at", null: false
t.string "version", null: false
t.text "status_reason"
t.boolean "privileged", default: true, null: false
t.index ["cluster_id"], name: "index_clusters_applications_runners_on_cluster_id", unique: true
t.index ["runner_id"], name: "index_clusters_applications_runners_on_runner_id"
end
end
# rubocop:enable Migration/SchemaAdditionMethodsNoPost
end
f239e2946d97b25d7f365d0cdf439be300f4b1bbc39e089abc8e8342a32679ed
\ No newline at end of file
...@@ -14387,27 +14387,6 @@ CREATE TABLE clusters ( ...@@ -14387,27 +14387,6 @@ CREATE TABLE clusters (
helm_major_version integer DEFAULT 3 NOT NULL helm_major_version integer DEFAULT 3 NOT NULL
); );
   
CREATE TABLE clusters_applications_runners (
id integer NOT NULL,
cluster_id integer NOT NULL,
runner_id integer,
status integer NOT NULL,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
version character varying NOT NULL,
status_reason text,
privileged boolean DEFAULT true NOT NULL
);
CREATE SEQUENCE clusters_applications_runners_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE clusters_applications_runners_id_seq OWNED BY clusters_applications_runners.id;
CREATE SEQUENCE clusters_id_seq CREATE SEQUENCE clusters_id_seq
START WITH 1 START WITH 1
INCREMENT BY 1 INCREMENT BY 1
...@@ -25009,8 +24988,6 @@ ALTER TABLE ONLY cluster_providers_gcp ALTER COLUMN id SET DEFAULT nextval('clus ...@@ -25009,8 +24988,6 @@ ALTER TABLE ONLY cluster_providers_gcp ALTER COLUMN id SET DEFAULT nextval('clus
   
ALTER TABLE ONLY clusters ALTER COLUMN id SET DEFAULT nextval('clusters_id_seq'::regclass); ALTER TABLE ONLY clusters ALTER COLUMN id SET DEFAULT nextval('clusters_id_seq'::regclass);
   
ALTER TABLE ONLY clusters_applications_runners ALTER COLUMN id SET DEFAULT nextval('clusters_applications_runners_id_seq'::regclass);
ALTER TABLE ONLY clusters_kubernetes_namespaces ALTER COLUMN id SET DEFAULT nextval('clusters_kubernetes_namespaces_id_seq'::regclass); ALTER TABLE ONLY clusters_kubernetes_namespaces ALTER COLUMN id SET DEFAULT nextval('clusters_kubernetes_namespaces_id_seq'::regclass);
   
ALTER TABLE ONLY commit_user_mentions ALTER COLUMN id SET DEFAULT nextval('commit_user_mentions_id_seq'::regclass); ALTER TABLE ONLY commit_user_mentions ALTER COLUMN id SET DEFAULT nextval('commit_user_mentions_id_seq'::regclass);
...@@ -26910,9 +26887,6 @@ ALTER TABLE ONLY cluster_providers_aws ...@@ -26910,9 +26887,6 @@ ALTER TABLE ONLY cluster_providers_aws
ALTER TABLE ONLY cluster_providers_gcp ALTER TABLE ONLY cluster_providers_gcp
ADD CONSTRAINT cluster_providers_gcp_pkey PRIMARY KEY (id); ADD CONSTRAINT cluster_providers_gcp_pkey PRIMARY KEY (id);
   
ALTER TABLE ONLY clusters_applications_runners
ADD CONSTRAINT clusters_applications_runners_pkey PRIMARY KEY (id);
ALTER TABLE ONLY clusters_integration_prometheus ALTER TABLE ONLY clusters_integration_prometheus
ADD CONSTRAINT clusters_integration_prometheus_pkey PRIMARY KEY (cluster_id); ADD CONSTRAINT clusters_integration_prometheus_pkey PRIMARY KEY (cluster_id);
   
...@@ -30368,10 +30342,6 @@ CREATE INDEX index_cluster_providers_gcp_on_cloud_run ON cluster_providers_gcp U ...@@ -30368,10 +30342,6 @@ CREATE INDEX index_cluster_providers_gcp_on_cloud_run ON cluster_providers_gcp U
   
CREATE UNIQUE INDEX index_cluster_providers_gcp_on_cluster_id ON cluster_providers_gcp USING btree (cluster_id); CREATE UNIQUE INDEX index_cluster_providers_gcp_on_cluster_id ON cluster_providers_gcp USING btree (cluster_id);
   
CREATE UNIQUE INDEX index_clusters_applications_runners_on_cluster_id ON clusters_applications_runners USING btree (cluster_id);
CREATE INDEX index_clusters_applications_runners_on_runner_id ON clusters_applications_runners USING btree (runner_id);
CREATE INDEX index_clusters_integration_prometheus_enabled ON clusters_integration_prometheus USING btree (enabled, created_at, cluster_id); CREATE INDEX index_clusters_integration_prometheus_enabled ON clusters_integration_prometheus USING btree (enabled, created_at, cluster_id);
   
CREATE INDEX index_clusters_kubernetes_namespaces_on_cluster_project_id ON clusters_kubernetes_namespaces USING btree (cluster_project_id); CREATE INDEX index_clusters_kubernetes_namespaces_on_cluster_project_id ON clusters_kubernetes_namespaces USING btree (cluster_project_id);
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
# See: https://docs.gitlab.com/ee/development/migration_style_guide.html#dropping-a-database-table # See: https://docs.gitlab.com/ee/development/migration_style_guide.html#dropping-a-database-table
REMOVED_FKS = { REMOVED_FKS = {
# example_table: %w[example_column] # example_table: %w[example_column]
clusters_applications_runners: %w[cluster_id]
}.with_indifferent_access.freeze }.with_indifferent_access.freeze
# List of columns historically missing a FK, don't add more columns # List of columns historically missing a FK, don't add more columns
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать