rosa-build/db/migrate/20110312133948_create_rpms.rb

20 lines
401 B
Ruby

# -*- encoding : utf-8 -*-
class CreateRpms < ActiveRecord::Migration
def self.up
create_table :rpms do |t|
t.string :name, :null => false
t.integer :arch_id, :null => false
t.integer :project_id, :null => false
t.timestamps
end
add_index :rpms, :project_id
add_index :rpms, [:project_id, :arch_id]
end
def self.down
drop_table :rpms
end
end