Sha256: 1e0c5ffbcf864bef244b9114dd91b81c3671df9e1cf42b8cbec836ee377f48bc

Contents?: true

Size: 510 Bytes

Versions: 7

Compression:

Stored size: 510 Bytes

Contents

# frozen_string_literal: true

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

    create_table :us_geo_zcta_mappings, id: false do |t|
      t.string :zipcode, primary_key: true, null: false, limit: 5
      t.string :zcta_zipcode, null: false, limit: 5, index: true
      t.datetime :updated_at, null: false
      t.integer :status, null: false, default: 0, limit: 1
    end
  end

  def down
    drop_table :us_geo_zcta_mappings
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

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