summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20201029143650_rename_application_settings_to_allow_deny_names.rb21
-rw-r--r--db/post_migrate/20201029144157_cleanup_application_settings_to_allow_deny_rename.rb19
-rw-r--r--db/schema_migrations/202010291436501
-rw-r--r--db/schema_migrations/202010291441571
-rw-r--r--db/structure.sql6
5 files changed, 45 insertions, 3 deletions
diff --git a/db/migrate/20201029143650_rename_application_settings_to_allow_deny_names.rb b/db/migrate/20201029143650_rename_application_settings_to_allow_deny_names.rb
new file mode 100644
index 00000000000..2d96da91069
--- /dev/null
+++ b/db/migrate/20201029143650_rename_application_settings_to_allow_deny_names.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class RenameApplicationSettingsToAllowDenyNames < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ rename_column_concurrently :application_settings, :domain_blacklist_enabled, :domain_denylist_enabled
+ rename_column_concurrently :application_settings, :domain_blacklist, :domain_denylist
+ rename_column_concurrently :application_settings, :domain_whitelist, :domain_allowlist
+ end
+
+ def down
+ undo_rename_column_concurrently :application_settings, :domain_blacklist_enabled, :domain_denylist_enabled
+ undo_rename_column_concurrently :application_settings, :domain_blacklist, :domain_denylist
+ undo_rename_column_concurrently :application_settings, :domain_whitelist, :domain_allowlist
+ end
+end
diff --git a/db/post_migrate/20201029144157_cleanup_application_settings_to_allow_deny_rename.rb b/db/post_migrate/20201029144157_cleanup_application_settings_to_allow_deny_rename.rb
new file mode 100644
index 00000000000..bb6fe4258c5
--- /dev/null
+++ b/db/post_migrate/20201029144157_cleanup_application_settings_to_allow_deny_rename.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class CleanupApplicationSettingsToAllowDenyRename < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ def up
+ cleanup_concurrent_column_rename :application_settings, :domain_blacklist_enabled, :domain_denylist_enabled
+ cleanup_concurrent_column_rename :application_settings, :domain_blacklist, :domain_denylist
+ cleanup_concurrent_column_rename :application_settings, :domain_whitelist, :domain_allowlist
+ end
+
+ def down
+ undo_cleanup_concurrent_column_rename :application_settings, :domain_blacklist_enabled, :domain_denylist_enabled
+ undo_cleanup_concurrent_column_rename :application_settings, :domain_blacklist, :domain_denylist
+ undo_cleanup_concurrent_column_rename :application_settings, :domain_whitelist, :domain_allowlist
+ end
+end
diff --git a/db/schema_migrations/20201029143650 b/db/schema_migrations/20201029143650
new file mode 100644
index 00000000000..c6f00890f4f
--- /dev/null
+++ b/db/schema_migrations/20201029143650
@@ -0,0 +1 @@
+c718bc731f7dc3e1f0104dfdb79a3dc46c46849153ec9b228600eeb5a92465e7 \ No newline at end of file
diff --git a/db/schema_migrations/20201029144157 b/db/schema_migrations/20201029144157
new file mode 100644
index 00000000000..7fdac19230f
--- /dev/null
+++ b/db/schema_migrations/20201029144157
@@ -0,0 +1 @@
+a61310c95a1302871ea18881d45bc0c7357baa8f24daa31b7e2174318dab5707 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index d461af965f5..d411fa028cc 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -9083,7 +9083,6 @@ CREATE TABLE application_settings (
max_attachment_size integer DEFAULT 10 NOT NULL,
default_project_visibility integer DEFAULT 0 NOT NULL,
default_snippet_visibility integer DEFAULT 0 NOT NULL,
- domain_whitelist text,
user_oauth_applications boolean DEFAULT true,
after_sign_out_path character varying,
session_expire_delay integer DEFAULT 10080 NOT NULL,
@@ -9119,8 +9118,6 @@ CREATE TABLE application_settings (
elasticsearch_search boolean DEFAULT false NOT NULL,
repository_storages character varying DEFAULT 'default'::character varying,
enabled_git_access_protocol character varying,
- domain_blacklist_enabled boolean DEFAULT false,
- domain_blacklist text,
usage_ping_enabled boolean DEFAULT true NOT NULL,
sign_in_text_html text,
help_page_text_html text,
@@ -9341,6 +9338,9 @@ CREATE TABLE application_settings (
secret_detection_token_revocation_url text,
encrypted_secret_detection_token_revocation_token text,
encrypted_secret_detection_token_revocation_token_iv text,
+ domain_denylist_enabled boolean DEFAULT false,
+ domain_denylist text,
+ domain_allowlist text,
new_user_signups_cap integer,
CONSTRAINT app_settings_registry_exp_policies_worker_capacity_positive CHECK ((container_registry_expiration_policies_worker_capacity >= 0)),
CONSTRAINT check_2dba05b802 CHECK ((char_length(gitpod_url) <= 255)),