feat: Add Platform APIs (#1456)

This commit is contained in:
Sojan Jose
2021-01-14 20:35:22 +05:30
committed by GitHub
parent 75c2a7cb2f
commit 7542330d61
25 changed files with 688 additions and 20 deletions

View File

@@ -0,0 +1,8 @@
class CreatePlatformApps < ActiveRecord::Migration[6.0]
def change
create_table :platform_apps do |t|
t.string :name, null: false
t.timestamps
end
end
end

View File

@@ -0,0 +1,11 @@
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