class IAmICanCreate<%= "#{name.underscore}_roles".camelize %> < ActiveRecord::Migration::Current def change create_table :<%= "#{name.underscore}_roles" %>, force: :cascade do |t| t.string :name, null: false t.integer :permission_ids, array: true, default: [ ] t.string :desc t.timestamps end add_index :<%= "#{name.underscore}_roles" %>, :name, unique: true, name: 'role_unique_index', using: :btree end end