class PersonDb::CreateDb
Public Instance Methods
up()
click to toggle source
# File lib/persondb/schema.rb, line 7 def up ActiveRecord::Schema.define do ########### # use people ? instead of persons (person/persons makes it easier?) create_table :persons do |t| t.string :key, null: false # import/export key t.string :name, null: false t.string :synonyms # comma separated list of synonyms ### fix: change to alt_names t.string :code # three letter code (short title) e.g used for formula1 driver etc. ## todo: add gender flag (male/female -man/lady how?) t.date :born_at # optional date of birth (birthday) ## todo: add country of birth might not be the same as nationality t.references :city t.references :state t.references :country ## , null: false t.references :nationality ## , null: false # by default assume same as country of birth (see above) ## fix: add nationality2 n nationality3 too t.timestamps end end # Schema.define end