Commit 563fd3cce6b44eb6a8b482c4679c7cc8761d04f8
1 parent
708ad3ec
Exists in
master
and in
28 other branches
ActionItem392: fixing migrations for postgres
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1971 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
db/migrate/036_add_published_field_to_article.rb
1 | 1 | class AddPublishedFieldToArticle < ActiveRecord::Migration |
2 | 2 | def self.up |
3 | 3 | add_column :articles, :published, :boolean, :default => true |
4 | - execute('update articles set published = 1') | |
4 | + execute('update articles set published = (1>0)') | |
5 | 5 | |
6 | 6 | add_column :article_versions, :published, :boolean, :default => true |
7 | 7 | end | ... | ... |
db/migrate/037_add_dates_to_articles.rb
... | ... | @@ -8,8 +8,8 @@ class AddDatesToArticles < ActiveRecord::Migration |
8 | 8 | |
9 | 9 | def self.up |
10 | 10 | each_table do |table| |
11 | - add_column table, :start_date, :type => :date | |
12 | - add_column table, :end_date, :type => :date | |
11 | + add_column table, :start_date, :date | |
12 | + add_column table, :end_date, :date | |
13 | 13 | end |
14 | 14 | end |
15 | 15 | ... | ... |