Sha256: 8d53c23b4198a807def7fdbd6a06653915baf6987484cd5afa8aa49627a66942
Contents?: true
Size: 379 Bytes
Versions: 6
Compression:
Stored size: 379 Bytes
Contents
class CreateRoles < ActiveRecord::Migration[5.0] def change create_table(:roles) do |t| t.string :name, limit: 256 t.timestamps end create_table :roles_users do |t| t.belongs_to :user, index: true t.belongs_to :role, index: true t.timestamps end add_index(:roles_users, [ :user_id, :role_id ], :unique => true) end end
Version data entries
6 entries across 6 versions & 1 rubygems