add index in migrate file
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user