summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-07-15 18:46:29 -0300
committerRémy Coutable <remy@rymai.me>2016-07-20 14:38:21 +0200
commit4d69cb9d9460f9805bfc1f34ca3a600f54804167 (patch)
treed252ca69044d640cdc4d5253a00552ec5e90d5cc /db/migrate
parenta920bf3834e870dbc1afabb043c962d26a9c9664 (diff)
downloadgitlab-ce-4d69cb9d9460f9805bfc1f34ca3a600f54804167.tar.gz
Allow to disable user request access to groups/projects
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20160715154212_add_request_access_enabled_to_projects.rb12
-rw-r--r--db/migrate/20160715204316_add_request_access_enabled_to_groups.rb12
2 files changed, 24 insertions, 0 deletions
diff --git a/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb
new file mode 100644
index 00000000000..bf0131c6d76
--- /dev/null
+++ b/db/migrate/20160715154212_add_request_access_enabled_to_projects.rb
@@ -0,0 +1,12 @@
+class AddRequestAccessEnabledToProjects < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default :projects, :request_access_enabled, :boolean, default: true
+ end
+
+ def down
+ remove_column :projects, :request_access_enabled
+ end
+end
diff --git a/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb
new file mode 100644
index 00000000000..e7b14cd3ee2
--- /dev/null
+++ b/db/migrate/20160715204316_add_request_access_enabled_to_groups.rb
@@ -0,0 +1,12 @@
+class AddRequestAccessEnabledToGroups < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+ disable_ddl_transaction!
+
+ def up
+ add_column_with_default :namespaces, :request_access_enabled, :boolean, default: true
+ end
+
+ def down
+ remove_column :namespaces, :request_access_enabled
+ end
+end