This repository has been archived on 2020-05-27. You can view files and clone it, but cannot push or open issues/pull-requests.
binaryattraction/schema/migrations/002_create_photos_migration.rb

16 lines
339 B
Ruby

class CreatePhotosMigration < ActiveRecord::Migration
def self.up
create_table :photos do |t|
t.string :filename, :content_type, :email_hash
t.integer :width, :height
t.datetime :created_at
t.boolean :approved
end
add_index :photos, :email_hash
end
def self.down
drop_table :photos
end
end