diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20150812080800_add_settings_import_sources.rb | 11 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/db/migrate/20150812080800_add_settings_import_sources.rb b/db/migrate/20150812080800_add_settings_import_sources.rb new file mode 100644 index 00000000000..276d2fdb2b1 --- /dev/null +++ b/db/migrate/20150812080800_add_settings_import_sources.rb @@ -0,0 +1,11 @@ +require 'yaml' + +class AddSettingsImportSources < ActiveRecord::Migration + def change + unless column_exists?(:application_settings, :import_sources) + add_column :application_settings, :import_sources, :text + import_sources = YAML::dump(Settings.gitlab['import_sources']) + execute("update application_settings set import_sources = '#{import_sources}'") + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 6e919f2883b..fdf09b3afdb 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150806104937) do +ActiveRecord::Schema.define(version: 20150812080800) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -44,6 +44,7 @@ ActiveRecord::Schema.define(version: 20150806104937) do t.boolean "user_oauth_applications", default: true t.string "after_sign_out_path" t.integer "session_expire_delay", default: 10080, null: false + t.text "import_sources" end create_table "audit_events", force: true do |t| |