Chatwoot/db/migrate/20201124101124_create_platform_app_permissibles.rb

12 lines
505 B
Ruby
Raw Permalink Normal View History

2021-01-14 15:05:22 +00:00
class CreatePlatformAppPermissibles < ActiveRecord::Migration[6.0]
def change
create_table :platform_app_permissibles do |t|
t.references :platform_app, index: true, null: false
t.references :permissible, null: false, polymorphic: true, index: { name: :index_platform_app_permissibles_on_permissibles }
t.timestamps
end
add_index :platform_app_permissibles, [:platform_app_id, :permissible_id, :permissible_type], unique: true, name: 'unique_permissibles_index'
end
end