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 @@ |
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 | 71 | t.boolean "virtual", :default => false |
72 | 72 | end |
73 | 73 | |
74 | - add_index "articles_categories", ["category_id"], :name => "index_articles_categories_on_category_id" | |
75 | 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 | 77 | create_table "blocks", :force => true do |t| |
78 | 78 | t.string "title" |
... | ... | @@ -112,8 +112,8 @@ ActiveRecord::Schema.define(:version => 50) do |
112 | 112 | t.boolean "virtual", :default => false |
113 | 113 | end |
114 | 114 | |
115 | - add_index "categories_profiles", ["category_id"], :name => "index_categories_profiles_on_category_id" | |
116 | 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 | 118 | create_table "comments", :force => true do |t| |
119 | 119 | t.string "title" |
... | ... | @@ -180,8 +180,8 @@ ActiveRecord::Schema.define(:version => 50) do |
180 | 180 | t.datetime "updated_at" |
181 | 181 | end |
182 | 182 | |
183 | - add_index "product_categorizations", ["category_id"], :name => "index_product_categorizations_on_category_id" | |
184 | 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 | 186 | create_table "products", :force => true do |t| |
187 | 187 | t.integer "enterprise_id" |
... | ... | @@ -220,6 +220,7 @@ ActiveRecord::Schema.define(:version => 50) do |
220 | 220 | t.text "custom_footer" |
221 | 221 | t.string "theme" |
222 | 222 | t.boolean "public_profile", :default => true |
223 | + t.boolean "public_article", :default => true | |
223 | 224 | end |
224 | 225 | |
225 | 226 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" |
... | ... | @@ -252,8 +253,8 @@ ActiveRecord::Schema.define(:version => 50) do |
252 | 253 | t.datetime "created_at" |
253 | 254 | end |
254 | 255 | |
255 | - add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type" | |
256 | 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 | 259 | create_table "tags", :force => true do |t| |
259 | 260 | t.string "name" | ... | ... |