diff options
Diffstat (limited to 'doc/development/migration_style_guide.md')
-rw-r--r-- | doc/development/migration_style_guide.md | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index c15e51c2b9d..1570f9e4096 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -424,16 +424,10 @@ Take the following migration as an example: ```ruby class DefaultRequestAccessGroups < ActiveRecord::Migration[5.2] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - def up - change_column_default :namespaces, :request_access_enabled, true - end - - def down - change_column_default :namespaces, :request_access_enabled, false + def change + change_column_default(:namespaces, :request_access_enabled, from: false, to: true) end end ``` |