sharedlists/db/migrate/20120312190323_create_user_accesses.rb
2021-12-18 11:39:41 +01:00

18 lines
387 B
Ruby

class CreateUserAccesses < ActiveRecord::Migration
def self.up
create_table :user_accesses do |t|
t.integer :user_id
t.integer :supplier_id
t.timestamps
end
add_index :user_accesses, :user_id
add_index :user_accesses, :supplier_id
add_index :user_accesses, [:user_id, :supplier_id]
end
def self.down
drop_table :user_accesses
end
end