photomix/db/migrate/20090520163842_create_album.rb
2012-07-27 00:26:23 +04:00

17 lines
375 B
Ruby

class CreateAlbum < ActiveRecord::Migration
def self.up
create_table :albums do |t|
t.string :title, :length => 250, :null => false
t.text :description
t.decimal :rating_average, :default => 0, :precision => 6, :scale => 2
t.string :url
t.boolean :public
t.timestamps
end
end
def self.down
drop_table :albums
end
end