Sha256: f8b32cecced98cb15d4b6e82a1cfd6dfcd5c49b7cfdf8d44eb54217ffa9a296f

Contents?: true

Size: 924 Bytes

Versions: 1

Compression:

Stored size: 924 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

1 entries across 1 versions & 1 rubygems

Version Path
spree-0.8.5 db/migrate/20090401223217_create_eu_vat_zone_again.rb