feat: Add Platform APIs (#1456)
This commit is contained in:
8
db/migrate/20201123195011_create_platform_apps.rb
Normal file
8
db/migrate/20201123195011_create_platform_apps.rb
Normal 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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user