gab-social/db/migrate/20200806174026_create_group_join_requests.rb
mgabdev 421ca77587 Added new migrations
• Added:
- new migrations
2020-08-06 23:19:34 -05:00

15 lines
455 B
Ruby

class CreateGroupJoinRequests < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def change
create_table :group_join_requests do |t|
t.belongs_to :account, foreign_key: { on_delete: :cascade }, null: false
t.belongs_to :group, foreign_key: { on_delete: :cascade }, null: false
t.timestamps null: false
end
add_index :group_join_requests, [:account_id, :group_id], unique: true, algorithm: :concurrently
end
end