diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-25 21:09:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-25 21:09:03 +0300 |
commit | 899bb5c4a9e249e2051bb564eeb17d1456b5ae8d (patch) | |
tree | 3938e810630ce69c80284aed48f1784b99a57806 /db | |
parent | 10cc2d7a724da4c74b9be7efdbd013c1744047ee (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20210122073805_add_repository_read_only_to_namespace_settings.rb | 19 | ||||
-rw-r--r-- | db/schema_migrations/20210122073805 | 1 | ||||
-rw-r--r-- | db/structure.sql | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20210122073805_add_repository_read_only_to_namespace_settings.rb b/db/migrate/20210122073805_add_repository_read_only_to_namespace_settings.rb new file mode 100644 index 00000000000..f6479bdb3a4 --- /dev/null +++ b/db/migrate/20210122073805_add_repository_read_only_to_namespace_settings.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddRepositoryReadOnlyToNamespaceSettings < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :namespace_settings, :repository_read_only, :boolean, default: false, null: false + end + end + + def down + with_lock_retries do + remove_column :namespace_settings, :repository_read_only + end + end +end diff --git a/db/schema_migrations/20210122073805 b/db/schema_migrations/20210122073805 new file mode 100644 index 00000000000..322c90eb820 --- /dev/null +++ b/db/schema_migrations/20210122073805 @@ -0,0 +1 @@ +f5231b1eec17ea1a67f2d2f4ca759314afb85b2c8fb431e3303d530d44bdb1ef
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 2ba8b8a9ff1..5662bba5fe4 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -14310,6 +14310,7 @@ CREATE TABLE namespace_settings ( prevent_forking_outside_group boolean DEFAULT false NOT NULL, allow_mfa_for_subgroups boolean DEFAULT true NOT NULL, default_branch_name text, + repository_read_only boolean DEFAULT false NOT NULL, CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)) ); |