Sha256: 85eeb602c6c745ed5736b25f1434c7f0a0259ca6f83a652aaf6a36b1df951f24
Contents?: true
Size: 473 Bytes
Versions: 7
Compression:
Stored size: 473 Bytes
Contents
class CreateGroups < ActiveRecord::Migration def change create_table :groups do |t| t.string :name t.timestamps end add_column :permissions, :group_id, :integer add_index :permissions, :group_id create_table :groups_users, id: false do |t| t.references :group t.references :user end add_index :groups_users, :group_id add_index :groups_users, :user_id add_index :groups_users, [:group_id, :user_id] end end
Version data entries
7 entries across 7 versions & 2 rubygems