sharedlists/db/migrate/20120312190323_create_user_accesses.rb

19 lines
392 B
Ruby
Raw Normal View History

class CreateUserAccesses < ActiveRecord::Migration[4.2]
2021-12-18 11:39:41 +01:00
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