Commit e5dfba71 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove default value from packages_enabled migration

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent c6794b33
......@@ -2229,7 +2229,7 @@ ActiveRecord::Schema.define(version: 20180823132905) do
t.boolean "mirror_overwrites_diverged_branches"
t.boolean "pages_https_only", default: true
t.string "external_webhook_token"
t.boolean "packages_enabled", default: true, null: false
t.boolean "packages_enabled"
end
add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree
......
......@@ -4,15 +4,7 @@ class AddPackagesEnabledToProject < ActiveRecord::Migration
DOWNTIME = false
disable_ddl_transaction!
def up
add_column_with_default(:projects, :packages_enabled, :boolean, default: true, allow_null: false)
end
def down
if column_exists?(:projects, :packages_enabled)
remove_column(:projects, :packages_enabled)
end
def change
add_column :projects, :packages_enabled, :boolean
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment