summaryrefslogtreecommitdiff
path: root/db/migrate/20160705054938_add_protected_branches_push_access.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20160705054938_add_protected_branches_push_access.rb')
-rw-r--r--db/migrate/20160705054938_add_protected_branches_push_access.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20160705054938_add_protected_branches_push_access.rb b/db/migrate/20160705054938_add_protected_branches_push_access.rb
new file mode 100644
index 00000000000..f27295524e1
--- /dev/null
+++ b/db/migrate/20160705054938_add_protected_branches_push_access.rb
@@ -0,0 +1,17 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddProtectedBranchesPushAccess < ActiveRecord::Migration
+ DOWNTIME = false
+
+ def change
+ create_table :protected_branch_push_access_levels do |t|
+ t.references :protected_branch, index: { name: "index_protected_branch_push_access" }, foreign_key: true, null: false
+
+ # Gitlab::Access::MASTER == 40
+ t.integer :access_level, default: 40, null: false
+
+ t.timestamps null: false
+ end
+ end
+end