diff options
Diffstat (limited to 'db/migrate/20210225153522_add_allow_force_push_to_protected_branches.rb')
-rw-r--r-- | db/migrate/20210225153522_add_allow_force_push_to_protected_branches.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20210225153522_add_allow_force_push_to_protected_branches.rb b/db/migrate/20210225153522_add_allow_force_push_to_protected_branches.rb new file mode 100644 index 00000000000..92a15cb45dd --- /dev/null +++ b/db/migrate/20210225153522_add_allow_force_push_to_protected_branches.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddAllowForcePushToProtectedBranches < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + with_lock_retries do + add_column :protected_branches, :allow_force_push, :boolean, default: false, null: false + end + end + + def down + with_lock_retries do + remove_column :protected_branches, :allow_force_push + end + end +end |