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

      t.string :type, null: false
      t.integer :code, null: false, default: 0
      t.string :street, limit: 64
      t.string :street_ext, limit: 64
      t.string :city, limit: 32
      t.string :state, limit: 32
      t.string :zip, limit: 10

      t.timestamps
    end
  end
end
