Sha256: a5e80d6442e6d3618a7bf0b417a54349499f8530b62e6547e5a517a37dac7c92

Contents?: true

Size: 528 Bytes

Versions: 2

Compression:

Stored size: 528 Bytes

Contents

class CreateCancanniblePermissions < ActiveRecord::Migration[6.1]
  def change
    create_table :permissions, force: true do |table|
      table.integer  :permissible_id
      table.string   :permissible_type
      table.integer  :resource_id
      table.string   :resource_type
      table.string   :ability
      table.boolean  :asserted
      table.datetime :created_at
      table.datetime :updated_at
    end
    add_index :permissions, [:permissible_id, :permissible_type], name: "index_permissions_permissible"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cancannible-2.1.0 lib/generators/cancannible/templates/migration.rb
cancannible-2.0.0 lib/generators/cancannible/templates/migration.rb