Sha256: 853d2ce5dda3cc3376a0a03ad01a1e44df4306b528caacbe091188b497a1cef4
Contents?: true
Size: 463 Bytes
Versions: 2
Compression:
Stored size: 463 Bytes
Contents
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
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
i_am_i_can-3.0.0pre | lib/generators/i_am_i_can/templates/migrations/role.erb |
i_am_i_can-2.1.0 | lib/generators/i_am_i_can/templates/migrations/role.erb |