summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-09-16 16:15:39 -0300
committerFelipe Artur <felipefac@gmail.com>2016-10-17 18:12:18 -0200
commitda07c2e4d3d382c05ec287ee60f639b870074fe7 (patch)
treef6ffa7fd29fe177d4d78c0e043a1fdcff5b6eba4 /db
parentc49e152605ad1fe77bea6414c383cf70669ca110 (diff)
downloadgitlab-ce-da07c2e4d3d382c05ec287ee60f639b870074fe7.tar.gz
Add visibility level to project repositoryissue_19734_2
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb14
-rw-r--r--db/schema.rb3
2 files changed, 16 insertions, 1 deletions
diff --git a/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb b/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb
new file mode 100644
index 00000000000..7b33da3ea11
--- /dev/null
+++ b/db/migrate/20161012180455_add_repository_access_level_to_project_feature.rb
@@ -0,0 +1,14 @@
+class AddRepositoryAccessLevelToProjectFeature < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+ disable_ddl_transaction!
+
+ DOWNTIME = false
+
+ def up
+ add_column_with_default(:project_features, :repository_access_level, :integer, default: ProjectFeature::ENABLED)
+ end
+
+ def down
+ remove_column :project_features, :repository_access_level
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index a362fd8f228..51ac0fbaeb5 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20161007133303) do
+ActiveRecord::Schema.define(version: 20161012180455) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -830,6 +830,7 @@ ActiveRecord::Schema.define(version: 20161007133303) do
t.integer "builds_access_level"
t.datetime "created_at"
t.datetime "updated_at"
+ t.integer "repository_access_level", default: 20, null: false
end
add_index "project_features", ["project_id"], name: "index_project_features_on_project_id", using: :btree