created optimized_image model

This commit is contained in:
Régis Hanol
2013-06-16 10:39:48 +02:00
parent 2c3f757951
commit 5de03814fb
5 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
class CreateOptimizedImages < ActiveRecord::Migration
def up
create_table :optimized_images do |t|
t.string :sha, null: false
t.string :ext, null: false
t.integer :width, null: false
t.integer :height, null: false
t.integer :upload_id, null: false
end
add_index :optimized_images, :upload_id
end
def down
drop_table :optimized_images
end
end