foreman/db/migrate/20090730152224_create_ptables.rb @ 0fa5d146
9a55cdc2 | Ohad Levy | class CreatePtables < ActiveRecord::Migration
|
|
2e291eb2 | Ohad Levy | class Ptable < ActiveRecord::Base; end
|
|
9a55cdc2 | Ohad Levy | def self.up
|
|
create_table :ptables do |t|
|
|||
t.string :name, :limit => 64, :null => false
|
|||
t.string :layout, :limit => 4096, :null => false
|
|||
c6eee281 | Ohad Levy | t.references :operatingsystem
|
|
9a55cdc2 | Ohad Levy | t.timestamps
|
|
end
|
|||
c6eee281 | Ohad Levy | create_table :operatingsystems_ptables, :id => false do |t|
|
|
t.references :ptable, :null => false
|
|||
t.references :operatingsystem, :null => false
|
|||
end
|
|||
9a55cdc2 | Ohad Levy | end
|
|
def self.down
|
|||
drop_table :ptables
|
|||
c6eee281 | Ohad Levy | drop_table :operatingsystems_ptables
|
|
9a55cdc2 | Ohad Levy | end
|
|
end
|