class Bookie::Database::Migration::CreateSystems
Public Instance Methods
down()
click to toggle source
# File lib/bookie/database.rb, line 75 def down drop_table :systems end
up()
click to toggle source
# File lib/bookie/database.rb, line 58 def up create_table :systems do |t| t.string :name, :null => false t.references :system_type, :null => false t.datetime :start_time, :null => false t.datetime :end_time t.integer :cores, :null => false t.integer :memory, :null => false, :limit => 8 end change_table :systems do |t| t.index [:name, :end_time], :unique => true t.index :start_time t.index :end_time t.index :system_type_id end end