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
339 B
Ruby

class CreatePhotosMigration < ActiveRecord::Migration
def self.up
create_table :photos do |t|
t.string :filename
t.integer :user_id
t.string :owner_token
t.datetime :created_at
end
add_index :photos, :user_id
add_index :photos, :owner_token
end
def self.down
drop_table :photos
end
end