You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20090704172355_create_groups_users.rb 388B

12345678910111213
  1. class CreateGroupsUsers < ActiveRecord::Migration[4.2]
  2. def self.up
  3. create_table :groups_users, :id => false do |t|
  4. t.column :group_id, :integer, :null => false
  5. t.column :user_id, :integer, :null => false
  6. end
  7. add_index :groups_users, [:group_id, :user_id], :unique => true, :name => :groups_users_ids
  8. end
  9. def self.down
  10. drop_table :groups_users
  11. end
  12. end