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

15 lines
319 B
Ruby
Raw Normal View History

2008-06-27 00:13:15 -04:00
class PhotoMigration < ActiveRecord::Migration
def self.up
create_table :photos do |t|
t.integer :author_id, :width, :height, :album_id
t.string :filename, :content_type
end
add_index :photos, :author_id
add_index :photos, :album_id
end
def self.down
drop_table :photos
end
end