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/005_photo_favorite_migratio...

14 lines
302 B
Ruby
Raw Permalink Normal View History

class PhotoFavoriteMigration < ActiveRecord::Migration
def self.up
create_table :photo_favorites do |t|
t.integer :photo_id, :user_id
end
add_index :photo_favorites, :photo_id
add_index :photo_favorites, :user_id
end
def self.down
drop_table :photo_favorites
end
end