Class: CreatePeople

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/reso/templates/create_people.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/generators/reso/templates/create_people.rb', line 2

def change
  create_table :people, options: 'DEFAULT CHARSET=utf8' do |t|
    t.string :person_key      # 123-1234-ABCD
    t.string :personal_title  # Mr, Ms, Miss, Mrs, Dr.
    t.string :first_name      # Edwin
    t.string :middle_name     # E.
    t.string :nick_name       # Buzz
    t.string :last_name       # Aldrin
    t.string :suffix          # Jr., Sr., MD, DDS
    t.date   :birthdate       # 1972-08-20
    t.references :gender
    t.string :preferred_locale, default: "en-US" # en-US
    t.string :modification_timestamp
    t.timestamps
  end
end