Chatwoot/db/migrate/20201124101124_create_platform_app_permissibles.rb
2021-01-14 20:35:22 +05:30

11 lines
505 B
Ruby

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