2019-10-25 20:31:19 -04:00
|
|
|
class CreateCustomers < ActiveRecord::Migration[5.2]
|
|
|
|
def change
|
|
|
|
create_table :discourse_patrons_customers do |t|
|
|
|
|
t.string :customer_id, null: false
|
|
|
|
t.references :user, foreign_key: true
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
2019-10-25 22:01:49 -04:00
|
|
|
add_index :discourse_patrons_customers, :user_id, unique: true
|
2019-10-25 20:31:19 -04:00
|
|
|
add_index :discourse_patrons_customers, :customer_id, unique: true
|
|
|
|
end
|
|
|
|
end
|