summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-08-30 23:01:26 +0000
committerRobert Speicher <robert@gitlab.com>2016-08-30 23:01:26 +0000
commit88295e07426698ce2af32af73ac0c34e540a0ba0 (patch)
tree4f2a54fd0bd29130b92500b9d33c5c1f6b3c28c6 /db
parent1e08429d2c9aa72918a0a3328d070f0768478463 (diff)
parentcf37d623e197dae5cc7efb021c1b1d85ca9674ee (diff)
downloadgitlab-ce-88295e07426698ce2af32af73ac0c34e540a0ba0.tar.gz
Merge branch 'project-specific-lfs' into 'master'
Added project specific enable/disable setting for LFS ## What does this MR do? Adds project specific enable/disable setting for LFS ## What are the relevant issue numbers? Needed for #18092 See merge request !5997
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160823213309_add_lfs_enabled_to_projects.rb29
-rw-r--r--db/schema.rb1
2 files changed, 30 insertions, 0 deletions
diff --git a/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb b/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb
new file mode 100644
index 00000000000..c169084e976
--- /dev/null
+++ b/db/migrate/20160823213309_add_lfs_enabled_to_projects.rb
@@ -0,0 +1,29 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddLfsEnabledToProjects < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ # Set this constant to true if this migration requires downtime.
+ DOWNTIME = false
+
+ # When a migration requires downtime you **must** uncomment the following
+ # constant and define a short and easy to understand explanation as to why the
+ # migration requires downtime.
+ # DOWNTIME_REASON = ''
+
+ # 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 change
+ add_column :projects, :lfs_enabled, :boolean
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 0cd8648da2e..e1ce7085c62 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -825,6 +825,7 @@ ActiveRecord::Schema.define(version: 20160827011312) do
t.string "repository_storage", default: "default", null: false
t.boolean "request_access_enabled", default: true, null: false
t.boolean "has_external_wiki"
+ t.boolean "lfs_enabled"
end
add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree