25 lines
809 B
Ruby
Executable File
25 lines
809 B
Ruby
Executable File
class CreateCustomers < ActiveRecord::Migration[5.1]
|
|
def change
|
|
create_table :customers, :id => false do |t|
|
|
t.string :customer_id, :limit => 16, :primary_key => true #custom foreign_key to prevent conflict during sync
|
|
t.string :name, :null => false
|
|
t.string :company
|
|
t.string :email
|
|
t.string :contact_no, :unique => true
|
|
t.date :date_of_birth
|
|
t.string :salutation
|
|
t.string :gender
|
|
t.string :nrc_no
|
|
t.string :address
|
|
t.string :card_no, :unique => true
|
|
t.string :paypar_account_no, :unique => true
|
|
t.string :membership_id
|
|
t.string :membership_type
|
|
t.string :membership_authentication_code
|
|
t.string :customer_type, :default => "Dinein"
|
|
t.json :tax_profiles
|
|
t.string :image_path
|
|
end
|
|
end
|
|
end
|