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

17 lines
400 B
Ruby
Raw Normal View History

2008-10-01 02:19:35 -04:00
class CreatePhotosMigration < ActiveRecord::Migration
def self.up
create_table :photos do |t|
t.string :filename, :content_type, :email_hash
t.integer :width, :height, :user_id
2008-10-01 02:19:35 -04:00
t.datetime :created_at
t.boolean :approved, :default => false
2008-10-01 02:19:35 -04:00
end
add_index :photos, :email_hash
add_index :photos, :user_id
2008-10-01 02:19:35 -04:00
end
def self.down
drop_table :photos
end
end