summaryrefslogtreecommitdiff
path: root/lib/tasks/populate_area_codes_pl.rake
blob: a3f725aa2c2aa7786e6e0c6b1e58a1c5b18ac6a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# encoding: UTF-8

desc "Populate database with Polish pre 2005 (now defunct) area codes"
task :areacodes_poland => :environment do
  if ! poland = Country.where( :name => 'Poland' ).first
    $stderr.puts "Error. Country not found."
    exit 1
  end

  AreaCode.create(:country => poland, :name => "Biała Podlaska", :area_code => "83")
  AreaCode.create(:country => poland, :name => "Białystok", :area_code => "85")
  AreaCode.create(:country => poland, :name => "Bielsko-Biała", :area_code => "33")
  AreaCode.create(:country => poland, :name => "Bydgoszcz", :area_code => "52")
  AreaCode.create(:country => poland, :name => "Chełm", :area_code => "82")
  AreaCode.create(:country => poland, :name => "Ciechanów", :area_code => "23")
  AreaCode.create(:country => poland, :name => "Częstochowa", :area_code => "34")
  AreaCode.create(:country => poland, :name => "Elbląg", :area_code => "55")
  AreaCode.create(:country => poland, :name => "Gdańsk", :area_code => "58")
  AreaCode.create(:country => poland, :name => "Gorzów Wielkopolski", :area_code => "95")
  AreaCode.create(:country => poland, :name => "Jelenia Góra", :area_code => "75")
  AreaCode.create(:country => poland, :name => "Kalisz", :area_code => "62")
  AreaCode.create(:country => poland, :name => "Katowice", :area_code => "32")
  AreaCode.create(:country => poland, :name => "Kielce", :area_code => "41")
  AreaCode.create(:country => poland, :name => "Konin", :area_code => "63")
  AreaCode.create(:country => poland, :name => "Koszalin", :area_code => "94")
  AreaCode.create(:country => poland, :name => "Kraków", :area_code => "12")
  AreaCode.create(:country => poland, :name => "Krosno", :area_code => "13")
  AreaCode.create(:country => poland, :name => "Legnica", :area_code => "76")
  AreaCode.create(:country => poland, :name => "Leszno", :area_code => "65")
  AreaCode.create(:country => poland, :name => "Łódź", :area_code => "42")
  AreaCode.create(:country => poland, :name => "Łomża", :area_code => "86")
  AreaCode.create(:country => poland, :name => "Lublin", :area_code => "81")
  AreaCode.create(:country => poland, :name => "Nowy Sącz", :area_code => "18")
  AreaCode.create(:country => poland, :name => "Olsztyn", :area_code => "89")
  AreaCode.create(:country => poland, :name => "Opole", :area_code => "77")
  AreaCode.create(:country => poland, :name => "Ostrołęka", :area_code => "29")
  AreaCode.create(:country => poland, :name => "Piła", :area_code => "67")
  AreaCode.create(:country => poland, :name => "Piotrków Trybunalski", :area_code => "44")
  AreaCode.create(:country => poland, :name => "Płock", :area_code => "24")
  AreaCode.create(:country => poland, :name => "Poznań", :area_code => "61")
  AreaCode.create(:country => poland, :name => "Przemyśl", :area_code => "16")
  AreaCode.create(:country => poland, :name => "Radom", :area_code => "48")
  AreaCode.create(:country => poland, :name => "Rzeszów", :area_code => "17")
  AreaCode.create(:country => poland, :name => "Siedlce", :area_code => "25")
  AreaCode.create(:country => poland, :name => "Sieradz", :area_code => "43")
  AreaCode.create(:country => poland, :name => "Skierniewice", :area_code => "46")
  AreaCode.create(:country => poland, :name => "Słupsk", :area_code => "59")
  AreaCode.create(:country => poland, :name => "Suwałki", :area_code => "87")
  AreaCode.create(:country => poland, :name => "Szczecin", :area_code => "91")
  AreaCode.create(:country => poland, :name => "Tarnobrzeg", :area_code => "15")
  AreaCode.create(:country => poland, :name => "Tarnów", :area_code => "14")
  AreaCode.create(:country => poland, :name => "Toruń", :area_code => "56")
  AreaCode.create(:country => poland, :name => "Wałbrzych", :area_code => "74")
  AreaCode.create(:country => poland, :name => "Warszawa", :area_code => "22")
  AreaCode.create(:country => poland, :name => "Włocławek", :area_code => "54")
  AreaCode.create(:country => poland, :name => "Wrocław", :area_code => "71")
  AreaCode.create(:country => poland, :name => "Zamość", :area_code => "84")
  AreaCode.create(:country => poland, :name => "Zielona Góra", :area_code => "68")
end