1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/db/migrate/20190627000456_create_contacts_lists.rb

20 lines
513 B
Ruby
Raw Normal View History

2019-06-26 20:21:37 -04:00
# frozen_string_literal: true
class CreateContactsLists < ActiveRecord::Migration[6.0]
def change
create_table :contacts_lists do |t|
t.timestamps null: false
end
# rubocop:disable Rails/NotNullColumn
add_reference :accounts, :contacts_list,
null: false, index: { unique: true }, foreign_key: true
add_reference :people, :contacts_list,
null: false, index: { unique: true }, foreign_key: true
# rubocop:enable Rails/NotNullColumn
end
end