class AddAdditionalNames < ActiveRecord::Migration[6.0]
  def change
    create_table :additional_names do |t|
      t.references :associated, polymorphic: true

      t.string :type, null: false
      t.integer :code, null: false, default: 0
      t.string :first_name, limit: 36, null: false
      t.string :middle_name, limit: 36
      t.string :last_name, limit: 36
      t.string :suffix, limit: 10

      t.timestamps
    end
  end
end
