summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJason Hollingsworth <jhworth.developer@gmail.com>2013-11-06 09:13:21 -0600
committerJason Hollingsworth <jhworth.developer@gmail.com>2013-11-26 22:22:07 -0600
commitd9bb4230cc3aa161876df821c34d8e9c53d2e7a6 (patch)
treed9923bbf4ebe3f6cf96f71cdcfe4c07cc94b6752 /db
parent51b5509bacdfba1d3ca84a4b56c6bd21942f1d2e (diff)
downloadgitlab-ce-d9bb4230cc3aa161876df821c34d8e9c53d2e7a6.tar.gz
Adding authenticated public mode (internal).
Added visibility_level icons to project view (rather than just text). Added public projects to search results. Added ability to restrict visibility levels standard users can set.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20131112220935_add_visibility_level_to_projects.rb13
-rw-r--r--db/schema.rb4
2 files changed, 15 insertions, 2 deletions
diff --git a/db/migrate/20131112220935_add_visibility_level_to_projects.rb b/db/migrate/20131112220935_add_visibility_level_to_projects.rb
new file mode 100644
index 00000000000..cf1e9f912a0
--- /dev/null
+++ b/db/migrate/20131112220935_add_visibility_level_to_projects.rb
@@ -0,0 +1,13 @@
+class AddVisibilityLevelToProjects < ActiveRecord::Migration
+ def self.up
+ add_column :projects, :visibility_level, :integer, :default => 0, :null => false
+ Project.where(public: true).update_all(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
+ remove_column :projects, :public
+ end
+
+ def self.down
+ add_column :projects, :public, :boolean, :default => false, :null => false
+ Project.where(visibility_level: Gitlab::VisibilityLevel::PUBLIC).update_all(public: true)
+ remove_column :projects, :visibility_level
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index a03e4713188..24d2fef4a19 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20131112114325) do
+ActiveRecord::Schema.define(:version => 20131112220935) do
create_table "broadcast_messages", :force => true do |t|
t.text "message", :null => false
@@ -185,13 +185,13 @@ ActiveRecord::Schema.define(:version => 20131112114325) do
t.boolean "merge_requests_enabled", :default => true, :null => false
t.boolean "wiki_enabled", :default => true, :null => false
t.integer "namespace_id"
- t.boolean "public", :default => false, :null => false
t.string "issues_tracker", :default => "gitlab", :null => false
t.string "issues_tracker_id"
t.boolean "snippets_enabled", :default => true, :null => false
t.datetime "last_activity_at"
t.boolean "imported", :default => false, :null => false
t.string "import_url"
+ t.integer "visibility_level", :default => 0, :null => false
end
add_index "projects", ["creator_id"], :name => "index_projects_on_owner_id"