summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-08-24 17:08:23 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-08-30 16:17:41 -0500
commit9d8fbcc03847820eeda61e9d765693161f3619c5 (patch)
treeabeae9a5ebcd5865b2674f4961c6398d8d6c4224 /db
parentdafbcf63bd4eb7a90b611b9054d7de7832e3c97a (diff)
downloadgitlab-ce-9d8fbcc03847820eeda61e9d765693161f3619c5.tar.gz
Added project specific enable/disable setting for LFS
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160823213309_add_enable_lfs_to_projects.rb29
-rw-r--r--db/schema.rb1
2 files changed, 30 insertions, 0 deletions
diff --git a/db/migrate/20160823213309_add_enable_lfs_to_projects.rb b/db/migrate/20160823213309_add_enable_lfs_to_projects.rb
new file mode 100644
index 00000000000..9df1a5078fa
--- /dev/null
+++ b/db/migrate/20160823213309_add_enable_lfs_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 AddEnableLfsToProjects < 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, :enable_lfs, :boolean
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 227e10294e4..28711294746 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -825,6 +825,7 @@ ActiveRecord::Schema.define(version: 20160824103857) 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 "enable_lfs"
end
add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree