Sha256: 12df8c0fec4612a37703372e9fce3d948038f5d93238e4da6230e74476f49f6c

Contents?: true

Size: 552 Bytes

Versions: 1

Compression:

Stored size: 552 Bytes

Contents

class CreatePermitPermissions < ActiveRecord::Migration[7.1]
  def change
    create_table :permits_permissions, id: :uuid do |t|
      t.string :owner_id, null: false
      t.string :owner_type, null: false
      t.string :resource_id, null: false
      t.string :resource_type, null: false
      t.string :permits, null: false

      t.datetime :started_at
      t.datetime :ended_at
      t.timestamps
    end

    add_index :permits_permissions, [:owner_id, :owner_type]
    add_index :permits_permissions, [:resource_id, :resource_type]
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
permits-0.1.0 lib/generators/permits/install/templates/create_permits_permissions.rb