summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorShinya Maeda <shinya@gitlab.com>2018-10-05 23:38:02 +0900
committerShinya Maeda <shinya@gitlab.com>2018-10-05 23:38:02 +0900
commit7542a5d102bc48f5f7b8104fda22f0975b2dd931 (patch)
tree9a94528103422fa5baaab096091e34ae6463d507 /db
parent8deb9c010fb4ab24b56a68470ecbf4b875467248 (diff)
parent88fa9a3c31d250ae9b88bb3250204b39eabc14b4 (diff)
downloadgitlab-ce-7542a5d102bc48f5f7b8104fda22f0975b2dd931.tar.gz
Merge branch 'master-ce' into scheduled-manual-jobs
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb16
-rw-r--r--db/schema.rb1
2 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb b/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb
new file mode 100644
index 00000000000..1d2f8cf9c76
--- /dev/null
+++ b/db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb
@@ -0,0 +1,16 @@
+class AddPagesAccessLevelToProjectFeature < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+ disable_ddl_transaction!
+
+ DOWNTIME = false
+
+ def up
+ add_column_with_default(:project_features, :pages_access_level, :integer, default: ProjectFeature::PUBLIC, allow_null: false)
+
+ change_column_default(:project_features, :pages_access_level, ProjectFeature::ENABLED)
+ end
+
+ def down
+ remove_column :project_features, :pages_access_level
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 82f50e0ecd2..773bfb96b93 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1580,6 +1580,7 @@ ActiveRecord::Schema.define(version: 20180924201039) do
t.datetime "created_at"
t.datetime "updated_at"
t.integer "repository_access_level", default: 20, null: false
+ t.integer "pages_access_level", default: 20, null: false
end
add_index "project_features", ["project_id"], name: "index_project_features_on_project_id", unique: true, using: :btree