summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2017-09-06 04:24:31 +0200
committerNick Thomas <nick@gitlab.com>2017-09-28 13:20:11 +0100
commit38607b48b689b39721ff0cf7355ba2a176f4bf5e (patch)
tree1a20b89406be995c97353fa4bd0caca9bb3aa907 /db
parente0e49f2f7120fee6ee34236ed6463e4c130f2ad1 (diff)
downloadgitlab-ce-38607b48b689b39721ff0cf7355ba2a176f4bf5e.tar.gz
[Backported from EE] Readonly flag for Projects
This is used in EE for the storage migration, and we want to use this in CE as well to be able to migrate projects to hashed_storage.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160713200638_add_repository_read_only_to_projects.rb9
-rw-r--r--db/schema.rb1
2 files changed, 10 insertions, 0 deletions
diff --git a/db/migrate/20160713200638_add_repository_read_only_to_projects.rb b/db/migrate/20160713200638_add_repository_read_only_to_projects.rb
new file mode 100644
index 00000000000..8ee8b55f210
--- /dev/null
+++ b/db/migrate/20160713200638_add_repository_read_only_to_projects.rb
@@ -0,0 +1,9 @@
+class AddRepositoryReadOnlyToProjects < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :projects, :repository_read_only, :boolean
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 330336e8e61..e2acca25c5e 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1215,6 +1215,7 @@ ActiveRecord::Schema.define(version: 20170921115009) do
t.datetime "last_repository_updated_at"
t.integer "storage_version", limit: 2
t.boolean "resolve_outdated_diff_discussions"
+ t.boolean "repository_read_only"
end
add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree