Commit 921b88f82d93bfec90555b47b7f6f8e982307025

Authored by MoisesMachado
1 parent ff4d6d02

ActionItem616: added missing migration file

  the migration file that add the public_profile and public_article
columns

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2396 3f533792-8f58-4932-b0fe-aaf55b0a4547
db/migrate/050_add_public_column_to_articles_and_profiles.rb
1 1 class AddPublicColumnToArticlesAndProfiles < ActiveRecord::Migration
2 2 def self.up
3 3 add_column :profiles, :public_profile, :boolean, :default => true
4   - add_column :profiles, :public_article, :boolean, :default => true
  4 + add_column :articles, :public_article, :boolean, :default => true
  5 + add_column :article_versions, :public_article, :boolean, :default => true
5 6 end
6 7  
7 8 def self.down
8 9 remove_column :profiles, :public_profile
9   - remove_column :profiles, :public_article
  10 + remove_column :articles, :public_article
  11 + remove_column :article_versions, :public_article
10 12 end
11 13 end
... ...
db/schema.rb
... ... @@ -36,6 +36,7 @@ ActiveRecord::Schema.define(:version =&gt; 50) do
36 36 t.date "start_date"
37 37 t.date "end_date"
38 38 t.integer "children_count", :default => 0
  39 + t.boolean "public_article", :default => true
39 40 end
40 41  
41 42 create_table "articles", :force => true do |t|
... ... @@ -63,6 +64,7 @@ ActiveRecord::Schema.define(:version =&gt; 50) do
63 64 t.date "start_date"
64 65 t.date "end_date"
65 66 t.integer "children_count", :default => 0
  67 + t.boolean "public_article", :default => true
66 68 end
67 69  
68 70 create_table "articles_categories", :id => false, :force => true do |t|
... ... @@ -220,7 +222,6 @@ ActiveRecord::Schema.define(:version =&gt; 50) do
220 222 t.text "custom_footer"
221 223 t.string "theme"
222 224 t.boolean "public_profile", :default => true
223   - t.boolean "public_article", :default => true
224 225 end
225 226  
226 227 add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id"
... ...