Mercurial > hg > soundsoftware-site
diff db/migrate/20120223110929_change_attachments_container_defaults.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | 433d4f72a19b |
children |
line wrap: on
line diff
--- a/db/migrate/20120223110929_change_attachments_container_defaults.rb Tue Sep 09 09:28:31 2014 +0100 +++ b/db/migrate/20120223110929_change_attachments_container_defaults.rb Tue Sep 09 09:29:00 2014 +0100 @@ -8,8 +8,8 @@ change_column :attachments, :container_id, :integer, :default => nil, :null => true change_column :attachments, :container_type, :string, :limit => 30, :default => nil, :null => true - Attachment.update_all "container_id = NULL", "container_id = 0" - Attachment.update_all "container_type = NULL", "container_type = ''" + Attachment.where("container_id = 0").update_all("container_id = NULL") + Attachment.where("container_type = ''").update_all("container_type = NULL") add_index :attachments, [:container_id, :container_type] end