diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /db/migrate/20201215205404_create_namespace_package_settings.rb | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'db/migrate/20201215205404_create_namespace_package_settings.rb')
-rw-r--r-- | db/migrate/20201215205404_create_namespace_package_settings.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/db/migrate/20201215205404_create_namespace_package_settings.rb b/db/migrate/20201215205404_create_namespace_package_settings.rb new file mode 100644 index 00000000000..d74b99597ce --- /dev/null +++ b/db/migrate/20201215205404_create_namespace_package_settings.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +class CreateNamespacePackageSettings < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + with_lock_retries do + create_table :namespace_package_settings, if_not_exists: true, id: false do |t| + t.references :namespace, primary_key: true, index: false, default: nil, foreign_key: { to_table: :namespaces, on_delete: :cascade }, type: :bigint + t.boolean :maven_duplicates_allowed, null: false, default: true + t.text :maven_duplicate_exception_regex, null: false, default: '' + end + end + + add_text_limit :namespace_package_settings, :maven_duplicate_exception_regex, 255 + end + + def down + drop_table :namespace_package_settings + end +end |