Skip to content
Snippets Groups Projects
Commit 65995280 authored by Hunter Stewart's avatar Hunter Stewart Committed by Tiger Watson
Browse files

Drop serverless_domain_cluster

Changelog: removed

Update structure sql

Add schema migration

Update REMOVED_FKS entries

Move dictionary file

Update dictionary file

Add missing items to down migration

Appease rubo cop
parent 361f5e6c
No related branches found
No related tags found
2 merge requests!122597doc/gitaly: Remove references to removed metrics,!119543Drop serverless_domain_cluster table
......@@ -6,3 +6,5 @@ description: "(Deprecated) A custom domain for a GitLab managed Knative installa
introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/19835
milestone: '12.6'
gitlab_schema: gitlab_main
removed_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/119543
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 DropServerlessDomainCluster < Gitlab::Database::Migration[2.1]
def up
drop_table :serverless_domain_cluster
end
# Based on original migration:
# https://gitlab.com/gitlab-org/gitlab/-/blob/5f7bd5b1455d87e2f1a2d1ae2c1147d51e97aa55/db/migrate/20191127030005_create_serverless_domain_cluster.rb
# rubocop:disable Migration/SchemaAdditionMethodsNoPost
def down
create_table :serverless_domain_cluster, id: false, primary_key: :uuid do |t|
t.string :uuid, null: false, limit: 14, primary_key: true
t.bigint :pages_domain_id, null: false
t.bigint :clusters_applications_knative_id, null: false
t.bigint :creator_id
t.datetime_with_timezone :created_at, null: false
t.datetime_with_timezone :updated_at, null: false
t.text :encrypted_key
t.string :encrypted_key_iv, limit: 255
t.text :certificate
t.index :clusters_applications_knative_id,
unique: true,
name: 'idx_serverless_domain_cluster_on_clusters_applications_knative'
t.index :pages_domain_id, name: 'index_serverless_domain_cluster_on_pages_domain_id'
t.index :creator_id, name: 'index_serverless_domain_cluster_on_creator_id'
end
end
# rubocop:enable Migration/SchemaAdditionMethodsNoPost
end
59423550699ab55d8bd2439c423c113d6f66d2cfcea2e606ffad92e00ae555de
\ No newline at end of file
......@@ -22560,18 +22560,6 @@ CREATE SEQUENCE sentry_issues_id_seq
 
ALTER SEQUENCE sentry_issues_id_seq OWNED BY sentry_issues.id;
 
CREATE TABLE serverless_domain_cluster (
uuid character varying(14) NOT NULL,
pages_domain_id bigint NOT NULL,
clusters_applications_knative_id bigint NOT NULL,
creator_id bigint,
created_at timestamp with time zone NOT NULL,
updated_at timestamp with time zone NOT NULL,
encrypted_key text,
encrypted_key_iv character varying(255),
certificate text
);
CREATE TABLE service_desk_custom_email_credentials (
project_id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
......@@ -28155,9 +28143,6 @@ ALTER TABLE ONLY sentry_issues
ALTER TABLE ONLY sprints
ADD CONSTRAINT sequence_is_unique_per_iterations_cadence_id UNIQUE (iterations_cadence_id, sequence) DEFERRABLE INITIALLY DEFERRED;
 
ALTER TABLE ONLY serverless_domain_cluster
ADD CONSTRAINT serverless_domain_cluster_pkey PRIMARY KEY (uuid);
ALTER TABLE ONLY service_desk_custom_email_credentials
ADD CONSTRAINT service_desk_custom_email_credentials_pkey PRIMARY KEY (project_id);
 
......@@ -29658,8 +29643,6 @@ CREATE UNIQUE INDEX idx_security_scans_on_build_and_scan_type ON security_scans
 
CREATE INDEX idx_security_scans_on_scan_type ON security_scans USING btree (scan_type);
 
CREATE UNIQUE INDEX idx_serverless_domain_cluster_on_clusters_applications_knative ON serverless_domain_cluster USING btree (clusters_applications_knative_id);
CREATE UNIQUE INDEX idx_software_license_policies_unique_on_project_and_scan_policy ON software_license_policies USING btree (project_id, software_license_id, scan_result_policy_id);
 
CREATE INDEX idx_streaming_headers_on_external_audit_event_destination_id ON audit_events_streaming_headers USING btree (external_audit_event_destination_id);
......@@ -32500,10 +32483,6 @@ CREATE UNIQUE INDEX index_sentry_issues_on_issue_id ON sentry_issues USING btree
 
CREATE INDEX index_sentry_issues_on_sentry_issue_identifier ON sentry_issues USING btree (sentry_issue_identifier);
 
CREATE INDEX index_serverless_domain_cluster_on_creator_id ON serverless_domain_cluster USING btree (creator_id);
CREATE INDEX index_serverless_domain_cluster_on_pages_domain_id ON serverless_domain_cluster USING btree (pages_domain_id);
CREATE INDEX index_service_desk_custom_email_verifications_on_triggerer_id ON service_desk_custom_email_verifications USING btree (triggerer_id);
 
CREATE INDEX index_service_desk_enabled_projects_on_id_creator_id_created_at ON projects USING btree (id, creator_id, created_at) WHERE (service_desk_enabled = true);
......@@ -24,8 +24,7 @@
REMOVED_FKS = {
clusters_applications_helm: %w[cluster_id],
clusters_applications_knative: %w[cluster_id],
clusters_applications_runners: %w[cluster_id],
serverless_domain_cluster: %w[clusters_applications_knative_id creator_id pages_domain_id]
clusters_applications_runners: %w[cluster_id]
}.with_indifferent_access.freeze
# List of columns historically missing a FK, don't add more columns
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment