Sha256: 58637bd3e60fe9946caf9fa0068cf9fb9a68f091e6da70afa0cd7a3791991940

Contents?: true

Size: 906 Bytes

Versions: 7

Compression:

Stored size: 906 Bytes

Contents

# frozen_string_literal: true

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

    create_table :us_geo_county_subdivisions, id: false do |t|
      t.string :geoid, primary_key: true, limit: 10, null: false
      t.integer :gnis_id, null: false, index: true
      t.string :name, null: false, limit: 60
      t.string :county_geoid, null: false, limit: 5, index: true
      t.string :fips_class_code, null: false, limit: 2
      t.float :land_area, null: true
      t.float :water_area, null: true
      t.integer :population, null: true
      t.integer :housing_units, null: true
      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_county_subdivisions
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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