Sha256: 846f1e69e588da909bf5a95fe4c2e840daafd9c029080ba1b42cf61c79f7ca6a

Contents?: true

Size: 921 Bytes

Versions: 7

Compression:

Stored size: 921 Bytes

Contents

# frozen_string_literal: true

class CreateUrbanAreas < ActiveRecord::Migration[5.0]
  def up
    return if table_exists?(:us_geo_urban_areas)

    create_table :us_geo_urban_areas, id: false do |t|
      t.string :geoid, primary_key: true, null: false, limit: 5
      t.string :name, null: false, limit: 90, index: {unique: true}
      t.string :short_name, null: false, limit: 60, index: {unique: true}
      t.string :primary_county_geoid, null: false, limit: 5, index: true
      t.string :type, null: false, limit: 30
      t.float :land_area, null: false
      t.float :water_area, null: false
      t.integer :population, null: false
      t.integer :housing_units, null: false
      t.float :lat, null: false
      t.float :lng, null: false
      t.datetime :updated_at, null: false
      t.integer :status, null: false, default: 0, limit: 1
    end
  end

  def down
    drop_table :us_geo_urban_areas
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
us_geo-2.1.1 db/migrate/20190221055000_create_urban_areas.rb
us_geo-2.1.0 db/migrate/20190221055000_create_urban_areas.rb
us_geo-2.0.4 db/migrate/20190221055000_create_urban_areas.rb
us_geo-2.0.3 db/migrate/20190221055000_create_urban_areas.rb
us_geo-2.0.2 db/migrate/20190221055000_create_urban_areas.rb
us_geo-2.0.1 db/migrate/20190221055000_create_urban_areas.rb
us_geo-2.0.0 db/migrate/20190221055000_create_urban_areas.rb