Commit bd487422
Changed files (2)
db/migrate/20140705232142_move_watermarks_from_creations_to_photos.rb
@@ -0,0 +1,8 @@
+class MoveWatermarksFromCreationsToPhotos < ActiveRecord::Migration
+ def change
+ Photo.includes(:creation).find_each do |photo|
+ say("migrating watermark: #{photo.creation.watermark} to #{photo.id}")
+ photo.update_attribute(:watermark, photo.creation.watermark) if photo.creation.watermark.present?
+ end
+ end
+end
db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140705231829) do
+ActiveRecord::Schema.define(version: 20140705232142) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"