Sha256: 8fd1c5f42dcc9e5178823d9b442ad2240d6a5eb9e7cdef2d4690487d8e3661cb

Contents?: true

Size: 923 Bytes

Versions: 6

Compression:

Stored size: 923 Bytes

Contents

class CreateEuVatZoneAgain < ActiveRecord::Migration
  def self.up
    # # create an EU VAT zone (for optional use with EU VAT)
    # zone = Zone.find_or_create_by_name_and_description "EU_VAT", "Countries that make up the EU VAT zone."
    # 
    # unless zone.id
    #   say "Zone EU_VAT ID not found"
    # end
    # 
    # countries = []
    # %w[AT BE BG CY CZ DK EE FI FR DE HU IE IT LV LT LU MT NL PL PT RO SK SI ES SE GB].each do |iso|
    #   countries << Country.find_by_iso(iso)
    # end
    # 
    # # manually create the countries (instead of using ActiveRecord method due to some apparent issues with HMP plugin)
    # countries.each do |country|
    #   execute "INSERT INTO zone_members (zone_id, zoneable_id, zoneable_type, created_at, updated_at) 
    #            VALUES (#{zone.id}, #{country.id}, 'Country', '#{Time.now.to_s(:db)}', '#{Time.now.to_s(:db)}')"
    # end
 end

  def self.down
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
spree-enriquez-0.9.4 db/migrate/20090401223217_create_eu_vat_zone_again.rb
spree-0.9.4 db/migrate/20090401223217_create_eu_vat_zone_again.rb
spree-0.9.3 db/migrate/20090401223217_create_eu_vat_zone_again.rb
spree-0.9.2 db/migrate/20090401223217_create_eu_vat_zone_again.rb
spree-0.9.1 db/migrate/20090401223217_create_eu_vat_zone_again.rb
spree-0.9.0 db/migrate/20090401223217_create_eu_vat_zone_again.rb