summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-12-14 22:25:26 -0700
committermo k <mo@mokhan.ca>2012-12-14 22:25:26 -0700
commite5f0290a59cd0b85082029b723ae1b48c6b931d9 (patch)
treed914dbec66eb3a46fd3eab3033b2a3f7c3dd8651 /db
parentba1cd9bd43e046bb48537cb58d05f2d0ee4f6d90 (diff)
recreate each version of the photos.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20121215051249_recreate_versions.rb11
-rw-r--r--db/schema.rb2
2 files changed, 12 insertions, 1 deletions
diff --git a/db/migrate/20121215051249_recreate_versions.rb b/db/migrate/20121215051249_recreate_versions.rb
new file mode 100644
index 00000000..871397cb
--- /dev/null
+++ b/db/migrate/20121215051249_recreate_versions.rb
@@ -0,0 +1,11 @@
+class RecreateVersions < ActiveRecord::Migration
+ def up
+ Photo.all.each do |photo|
+ puts "recreating #{photo.id}"
+ Delayed::Job.enqueue RecreatePhotoVersions.new(photo.id)
+ end
+ end
+
+ def down
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index d11b68da..499a3fca 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20121211142144) do
+ActiveRecord::Schema.define(:version => 20121215051249) do
create_table "active_admin_comments", :force => true do |t|
t.integer "resource_id", :null => false