Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20240123000000_update_workspaces_url_prefix_column.rb')
-rw-r--r--db/migrate/20240123000000_update_workspaces_url_prefix_column.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20240123000000_update_workspaces_url_prefix_column.rb b/db/migrate/20240123000000_update_workspaces_url_prefix_column.rb
new file mode 100644
index 00000000000..084a7e4b0b9
--- /dev/null
+++ b/db/migrate/20240123000000_update_workspaces_url_prefix_column.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class UpdateWorkspacesUrlPrefixColumn < Gitlab::Database::Migration[2.2]
+ milestone '16.8'
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ execute(<<~SQL)
+ UPDATE workspaces
+ SET url_prefix=REPLACE(url_prefix, 'https://', '')
+ WHERE url_prefix LIKE 'https://%'
+ SQL
+ end
+
+ def down
+ # no-op
+ end
+end