diff options
author | Tuomo Ala-Vannesluoma <tuomoav@gmail.com> | 2018-10-05 13:41:11 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-10-05 13:41:11 +0000 |
commit | c84b60b1645950a30fdbc37c9065a200dc750d90 (patch) | |
tree | 76d523f37481fa1422f63e96e2a1777d48060b9c /db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb | |
parent | c972f2e459a6b45852a3d4e76566cdf772a6764a (diff) | |
download | gitlab-ce-c84b60b1645950a30fdbc37c9065a200dc750d90.tar.gz |
Make GitLab pages support access control
Diffstat (limited to 'db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb')
-rw-r--r-- | db/migrate/20180423204600_add_pages_access_level_to_project_feature.rb | 16 |
1 files changed, 16 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 |