add index in migrate file

This commit is contained in:
phyusin
2018-07-06 11:55:22 +06:30
parent 6e197fb37e
commit 8e28559fb0
20 changed files with 63 additions and 48 deletions

View File

@@ -13,12 +13,13 @@ class CreateCustomers < ActiveRecord::Migration[5.1]
t.string :address
t.string :card_no, :unique => true
t.string :paypar_account_no, :unique => true
t.string :membership_id
t.string :membership_id, :index => true
t.string :membership_type
t.string :membership_authentication_code
t.string :customer_type, :default => "Dinein"
t.string :customer_type, :default => "Dinein", :index => true
t.json :tax_profiles
t.string :image_path
end
add_index :customers, [:membership_id, :customer_type]
end
end