Sha256: bb499a14cb70cdf241051cc4072cc6233e9bd38dae9afdeb6947b12182d7b1e6

Contents?: true

Size: 546 Bytes

Versions: 2

Compression:

Stored size: 546 Bytes

Contents

class IAmICanCreate<%= "#{name.underscore}_role_groups".camelize %> < ActiveRecord::Migration::Current
  def change
    create_table :<%= "#{name.underscore}_role_groups" %>, force: :cascade do |t|
      t.string  :name,           null: false
      t.integer :member_ids,     array: true, default: [ ]
      t.integer :permission_ids, array: true, default: [ ]
      t.string  :desc

      t.timestamps
    end

    add_index :<%= "#{name.underscore}_role_groups" %>, :name, unique: true, name: 'role_group_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_group.erb
i_am_i_can-2.1.0 lib/generators/i_am_i_can/templates/migrations/role_group.erb