summaryrefslogtreecommitdiff
path: root/db/to-dos/20120119160732_emergency_numbers_germany.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:05:14 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:05:14 +0100
commiteaad37485fe59d0306c37cc038dda6d210052910 (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /db/to-dos/20120119160732_emergency_numbers_germany.rb
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
parentb80bd744ad873f6fc43018bc4bfb90677de167bd (diff)
Merge branch 'develop'
Diffstat (limited to 'db/to-dos/20120119160732_emergency_numbers_germany.rb')
-rw-r--r--db/to-dos/20120119160732_emergency_numbers_germany.rb30
1 files changed, 30 insertions, 0 deletions
diff --git a/db/to-dos/20120119160732_emergency_numbers_germany.rb b/db/to-dos/20120119160732_emergency_numbers_germany.rb
new file mode 100644
index 0000000..9dd9131
--- /dev/null
+++ b/db/to-dos/20120119160732_emergency_numbers_germany.rb
@@ -0,0 +1,30 @@
+# ruby encoding: utf-8
+
+class EmergencyNumbersGermany < ActiveRecord::Migration
+
+ def up
+ # add_column :phone_numbers, :uuid, :string
+ # add_index :phone_numbers, :uuid
+
+ germany = Country.find_by_name('Germany')
+
+ ################################################################
+ # Emergency numbers which shouldn't be used as extensions
+ ################################################################
+ notruf_nummern = germany.phone_number_ranges.find_or_create_by_name(SERVICE_NUMBERS)
+ notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Polizei', '110')
+ notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Feuerwehr', '112')
+ notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Zentrale Behördenrufnummer', '115')
+ notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Krankenwagen', '19222')
+ notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Weisser Ring e. V.', '116006')
+ notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Nummer gegen Kummer e. V.', '116111')
+ notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Zentrale Anlaufstelle zur Sperrung elektronischer Berechtigungen', '116116')
+ notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Kassenärztliche Vereinigung: ärztliche Bereitschaftsdienste', '116117')
+ notruf_nummern.phone_numbers.find_or_create_by_name_and_number('Katholische Bundesarbeitsgemeinschaft für Ehe-, Familien- und Lebensberatung, Telefonseelsorge', '116123')
+ end
+
+ def down
+ germany = Country.find_by_name('Germany')
+ germany.phone_number_ranges.where(:name => SERVICE_NUMBERS).destroy_all
+ end
+end