Method: CreateZipMetaTable.up

Defined in:
lib/generators/templates/create_zip_meta_table.rb

.upObject



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

def self.up
  create_table :zip_meta, :force => true do |t|
    t.string :zip
    t.string :city
    t.string :state
    t.float :latitude
    t.float :longitude
    t.integer :timezone
  end
  add_index :zip_meta, :zip
  add_index :zip_meta, :timezone
  
  # finally, load the data...
  ZipMeta::MigrationUtil.load_zipcode_data
end