Commit 921b88f82d93bfec90555b47b7f6f8e982307025
1 parent
ff4d6d02
Exists in
master
and in
29 other branches
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
Showing
2 changed files
with
6 additions
and
3 deletions
Show diff stats
db/migrate/050_add_public_column_to_articles_and_profiles.rb
1 | class AddPublicColumnToArticlesAndProfiles < ActiveRecord::Migration | 1 | class AddPublicColumnToArticlesAndProfiles < ActiveRecord::Migration |
2 | def self.up | 2 | def self.up |
3 | add_column :profiles, :public_profile, :boolean, :default => true | 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 | end | 6 | end |
6 | 7 | ||
7 | def self.down | 8 | def self.down |
8 | remove_column :profiles, :public_profile | 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 | end | 12 | end |
11 | end | 13 | end |
db/schema.rb
@@ -36,6 +36,7 @@ ActiveRecord::Schema.define(:version => 50) do | @@ -36,6 +36,7 @@ ActiveRecord::Schema.define(:version => 50) do | ||
36 | t.date "start_date" | 36 | t.date "start_date" |
37 | t.date "end_date" | 37 | t.date "end_date" |
38 | t.integer "children_count", :default => 0 | 38 | t.integer "children_count", :default => 0 |
39 | + t.boolean "public_article", :default => true | ||
39 | end | 40 | end |
40 | 41 | ||
41 | create_table "articles", :force => true do |t| | 42 | create_table "articles", :force => true do |t| |
@@ -63,6 +64,7 @@ ActiveRecord::Schema.define(:version => 50) do | @@ -63,6 +64,7 @@ ActiveRecord::Schema.define(:version => 50) do | ||
63 | t.date "start_date" | 64 | t.date "start_date" |
64 | t.date "end_date" | 65 | t.date "end_date" |
65 | t.integer "children_count", :default => 0 | 66 | t.integer "children_count", :default => 0 |
67 | + t.boolean "public_article", :default => true | ||
66 | end | 68 | end |
67 | 69 | ||
68 | create_table "articles_categories", :id => false, :force => true do |t| | 70 | create_table "articles_categories", :id => false, :force => true do |t| |
@@ -220,7 +222,6 @@ ActiveRecord::Schema.define(:version => 50) do | @@ -220,7 +222,6 @@ ActiveRecord::Schema.define(:version => 50) do | ||
220 | t.text "custom_footer" | 222 | t.text "custom_footer" |
221 | t.string "theme" | 223 | t.string "theme" |
222 | t.boolean "public_profile", :default => true | 224 | t.boolean "public_profile", :default => true |
223 | - t.boolean "public_article", :default => true | ||
224 | end | 225 | end |
225 | 226 | ||
226 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" | 227 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" |