summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorArtem Sidorenko <artem.sidorenko@telekom.de>2015-08-12 08:13:20 +0200
committerArtem Sidorenko <artem.sidorenko@telekom.de>2015-08-20 11:28:27 +0200
commit55dca86b983496a26a3913aead77439edf96afe9 (patch)
treec02b8dfe8aba50265f59ba0170eb09b9fc2f9e19 /db
parent55fc58bda4a5592f2f8deaecec9526fbe4eecd6f (diff)
downloadgitlab-ce-55dca86b983496a26a3913aead77439edf96afe9.tar.gz
Import sources: settings in the admin interface
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150812080800_add_settings_import_sources.rb11
-rw-r--r--db/schema.rb3
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|