Commit ff4d6d02be1d6b80abc88c6b999dfa7a091c19d6
1 parent
451c0a9f
Exists in
master
and in
22 other branches
ActionItem616: added column public_profile and public_article
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2395 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
16 additions
and
4 deletions
Show diff stats
db/migrate/050_add_public_column_to_articles_and_profiles.rb
0 → 100644
@@ -0,0 +1,11 @@ | @@ -0,0 +1,11 @@ | ||
1 | +class AddPublicColumnToArticlesAndProfiles < ActiveRecord::Migration | ||
2 | + def self.up | ||
3 | + add_column :profiles, :public_profile, :boolean, :default => true | ||
4 | + add_column :profiles, :public_article, :boolean, :default => true | ||
5 | + end | ||
6 | + | ||
7 | + def self.down | ||
8 | + remove_column :profiles, :public_profile | ||
9 | + remove_column :profiles, :public_article | ||
10 | + end | ||
11 | +end |
db/schema.rb
@@ -71,8 +71,8 @@ ActiveRecord::Schema.define(:version => 50) do | @@ -71,8 +71,8 @@ ActiveRecord::Schema.define(:version => 50) do | ||
71 | t.boolean "virtual", :default => false | 71 | t.boolean "virtual", :default => false |
72 | end | 72 | end |
73 | 73 | ||
74 | - add_index "articles_categories", ["category_id"], :name => "index_articles_categories_on_category_id" | ||
75 | add_index "articles_categories", ["article_id"], :name => "index_articles_categories_on_article_id" | 74 | add_index "articles_categories", ["article_id"], :name => "index_articles_categories_on_article_id" |
75 | + add_index "articles_categories", ["category_id"], :name => "index_articles_categories_on_category_id" | ||
76 | 76 | ||
77 | create_table "blocks", :force => true do |t| | 77 | create_table "blocks", :force => true do |t| |
78 | t.string "title" | 78 | t.string "title" |
@@ -112,8 +112,8 @@ ActiveRecord::Schema.define(:version => 50) do | @@ -112,8 +112,8 @@ ActiveRecord::Schema.define(:version => 50) do | ||
112 | t.boolean "virtual", :default => false | 112 | t.boolean "virtual", :default => false |
113 | end | 113 | end |
114 | 114 | ||
115 | - add_index "categories_profiles", ["category_id"], :name => "index_categories_profiles_on_category_id" | ||
116 | add_index "categories_profiles", ["profile_id"], :name => "index_categories_profiles_on_profile_id" | 115 | add_index "categories_profiles", ["profile_id"], :name => "index_categories_profiles_on_profile_id" |
116 | + add_index "categories_profiles", ["category_id"], :name => "index_categories_profiles_on_category_id" | ||
117 | 117 | ||
118 | create_table "comments", :force => true do |t| | 118 | create_table "comments", :force => true do |t| |
119 | t.string "title" | 119 | t.string "title" |
@@ -180,8 +180,8 @@ ActiveRecord::Schema.define(:version => 50) do | @@ -180,8 +180,8 @@ ActiveRecord::Schema.define(:version => 50) do | ||
180 | t.datetime "updated_at" | 180 | t.datetime "updated_at" |
181 | end | 181 | end |
182 | 182 | ||
183 | - add_index "product_categorizations", ["category_id"], :name => "index_product_categorizations_on_category_id" | ||
184 | add_index "product_categorizations", ["product_id"], :name => "index_product_categorizations_on_product_id" | 183 | add_index "product_categorizations", ["product_id"], :name => "index_product_categorizations_on_product_id" |
184 | + add_index "product_categorizations", ["category_id"], :name => "index_product_categorizations_on_category_id" | ||
185 | 185 | ||
186 | create_table "products", :force => true do |t| | 186 | create_table "products", :force => true do |t| |
187 | t.integer "enterprise_id" | 187 | t.integer "enterprise_id" |
@@ -220,6 +220,7 @@ ActiveRecord::Schema.define(:version => 50) do | @@ -220,6 +220,7 @@ ActiveRecord::Schema.define(:version => 50) do | ||
220 | t.text "custom_footer" | 220 | t.text "custom_footer" |
221 | t.string "theme" | 221 | t.string "theme" |
222 | t.boolean "public_profile", :default => true | 222 | t.boolean "public_profile", :default => true |
223 | + t.boolean "public_article", :default => true | ||
223 | end | 224 | end |
224 | 225 | ||
225 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" | 226 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" |
@@ -252,8 +253,8 @@ ActiveRecord::Schema.define(:version => 50) do | @@ -252,8 +253,8 @@ ActiveRecord::Schema.define(:version => 50) do | ||
252 | t.datetime "created_at" | 253 | t.datetime "created_at" |
253 | end | 254 | end |
254 | 255 | ||
255 | - add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type" | ||
256 | add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" | 256 | add_index "taggings", ["tag_id"], :name => "index_taggings_on_tag_id" |
257 | + add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type" | ||
257 | 258 | ||
258 | create_table "tags", :force => true do |t| | 259 | create_table "tags", :force => true do |t| |
259 | t.string "name" | 260 | t.string "name" |