class CreateClients

Public Instance Methods

change() click to toggle source
# File lib/generators/project/db/migrate/5_create_clients.rb, line 2
def change
  create_table :clients do |t|
    t.belongs_to :city, null: true, index: true
    t.belongs_to :country, null: true, index: true

    t.string :name, null: true, limit: 64
    t.string :sex, index: true, limit: 6
    t.datetime :birthday, index: true

    t.timestamps
  end

  add_index :clients, :name, name: :clients_name, type: :fulltext

end