You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
542 B
16 lines
542 B
# frozen_string_literal: true |
|
|
|
class CreateAccountRelationshipSeveranceEvents < ActiveRecord::Migration[7.1] |
|
def change |
|
create_table :account_relationship_severance_events do |t| |
|
t.belongs_to :account, foreign_key: { on_delete: :cascade }, null: false |
|
t.belongs_to :relationship_severance_event, foreign_key: { on_delete: :cascade }, null: false |
|
|
|
t.integer :relationships_count, default: 0, null: false |
|
|
|
t.index [:account_id, :relationship_severance_event_id], unique: true |
|
|
|
t.timestamps |
|
end |
|
end |
|
end
|
|
|