summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-06-07 20:27:30 +0200
committerKamil Trzciński <ayufan@ayufan.eu>2018-06-07 20:27:30 +0200
commitb780efab26b83124bd42abf276d0fc388ae68309 (patch)
treefdd5e88008aa897e68df61cffedf61a617a7aeee /db
parent2bc1835597446a1240cfb364d1943feb4080e675 (diff)
parentba4dc01ea83c261c4054c32482b021a1005a1968 (diff)
downloadgitlab-ce-b780efab26b83124bd42abf276d0fc388ae68309.tar.gz
Merge remote-tracking branch 'origin/master' into 38542-application-control-panel-in-settings-page
Diffstat (limited to 'db')
-rw-r--r--db/fixtures/development/04_project.rb4
-rw-r--r--db/fixtures/development/08_settings.rb7
-rw-r--r--db/migrate/20170925184228_add_favicon_to_appearances.rb7
-rw-r--r--db/schema.rb1
4 files changed, 19 insertions, 0 deletions
diff --git a/db/fixtures/development/04_project.rb b/db/fixtures/development/04_project.rb
index 213c8bca639..51e69879c79 100644
--- a/db/fixtures/development/04_project.rb
+++ b/db/fixtures/development/04_project.rb
@@ -67,6 +67,10 @@ Sidekiq::Testing.inline! do
skip_disk_validation: true
}
+ if i % 2 == 0
+ params[:storage_version] = Project::LATEST_STORAGE_VERSION
+ end
+
project = Projects::CreateService.new(User.first, params).execute
# Seed-Fu runs this entire fixture in a transaction, so the `after_commit`
# hook won't run until after the fixture is loaded. That is too late
diff --git a/db/fixtures/development/08_settings.rb b/db/fixtures/development/08_settings.rb
new file mode 100644
index 00000000000..141465c06cf
--- /dev/null
+++ b/db/fixtures/development/08_settings.rb
@@ -0,0 +1,7 @@
+# We want to enable hashed storage for every new project in development
+# Details https://gitlab.com/gitlab-org/gitlab-ce/issues/46241
+Gitlab::Seeder.quiet do
+ ApplicationSetting.create_from_defaults unless ApplicationSetting.current_without_cache
+ ApplicationSetting.current_without_cache.update!(hashed_storage_enabled: true)
+ print '.'
+end
diff --git a/db/migrate/20170925184228_add_favicon_to_appearances.rb b/db/migrate/20170925184228_add_favicon_to_appearances.rb
new file mode 100644
index 00000000000..65083733afb
--- /dev/null
+++ b/db/migrate/20170925184228_add_favicon_to_appearances.rb
@@ -0,0 +1,7 @@
+class AddFaviconToAppearances < ActiveRecord::Migration
+ DOWNTIME = false
+
+ def change
+ add_column :appearances, :favicon, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 80bd7b4ca86..d1446af0a2e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -38,6 +38,7 @@ ActiveRecord::Schema.define(version: 20180603190921) do
t.integer "cached_markdown_version"
t.text "new_project_guidelines"
t.text "new_project_guidelines_html"
+ t.string "favicon"
end
create_table "application_setting_terms", force: :cascade do |t|