Sha256: 7abe3611aeb545a77ef56be747185e3db111840ed737f87ab9549704f400132a

Contents?: true

Size: 517 Bytes

Versions: 6

Compression:

Stored size: 517 Bytes

Contents

# frozen_string_literal: true

class AddIndexOnZctasGeoids < ActiveRecord::Migration[5.0]
  def up
    unless index_exists?(:us_geo_zctas, :primary_place_geoid)
      add_index :us_geo_zctas, :primary_place_geoid
    end

    unless index_exists?(:us_geo_zctas, :primary_county_subdivision_geoid)
      add_index :us_geo_zctas, :primary_county_subdivision_geoid
    end
  end

  def down
    remove_index :us_geo_zctas, :primary_place_geoid
    remove_index :us_geo_zctas, :primary_county_subdivision_geoid
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
us_geo-2.1.1 db/migrate/20230426000100_add_index_on_zctas_geoids.rb
us_geo-2.1.0 db/migrate/20230426000100_add_index_on_zctas_geoids.rb
us_geo-2.0.4 db/migrate/20230426000100_add_index_on_zctas_geoids.rb
us_geo-2.0.3 db/migrate/20230426000100_add_index_on_zctas_geoids.rb
us_geo-2.0.2 db/migrate/20230426000100_add_index_on_zctas_geoids.rb
us_geo-2.0.1 db/migrate/20230426000100_add_index_on_zctas_geoids.rb