Commit 2a8a78f7 authored by Douwe Maan's avatar Douwe Maan

Merge branch 'issue_548' into 'master'

Remote Mirrors should be disabled by default

REF: #548 

See merge request !428
parents 032ba126 58467b35
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class MakeRemoteMirrorsDisabledByDefault < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
# When using the methods "add_concurrent_index" or "add_column_with_default"
# you must disable the use of transactions as these methods can not run in an
# existing transaction. When using "add_concurrent_index" make sure that this
# method is the _only_ method called in the migration, any other changes
# should go in a separate migration. This ensures that upon failure _only_ the
# index creation fails and can be retried or reverted easily.
#
# To disable transactions uncomment the following line and remove these
# comments:
# disable_ddl_transaction!
def up
change_column :remote_mirrors, :enabled, :boolean, default: false
end
def down
change_column :remote_mirrors, :enabled, :boolean, default: true
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160509201028) do
ActiveRecord::Schema.define(version: 20160530214349) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -922,7 +922,7 @@ ActiveRecord::Schema.define(version: 20160509201028) do
create_table "remote_mirrors", force: :cascade do |t|
t.integer "project_id"
t.string "url"
t.boolean "enabled", default: true
t.boolean "enabled", default: false
t.string "update_status"
t.datetime "last_update_at"
t.datetime "last_successful_update_at"
......
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