diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:01:45 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2012-12-17 12:01:45 +0100 |
commit | b80bd744ad873f6fc43018bc4bfb90677de167bd (patch) | |
tree | 072c4b0e33d442528555b82c415f5e7a1712b2b0 /db/to-dos | |
parent | 3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff) |
Start of GS5.
Diffstat (limited to 'db/to-dos')
-rw-r--r-- | db/to-dos/20120119160732_emergency_numbers_germany.rb | 30 | ||||
-rw-r--r-- | db/to-dos/20120223142004_add_more_german_area_codes.rb | 58 |
2 files changed, 88 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 diff --git a/db/to-dos/20120223142004_add_more_german_area_codes.rb b/db/to-dos/20120223142004_add_more_german_area_codes.rb new file mode 100644 index 0000000..2eb2554 --- /dev/null +++ b/db/to-dos/20120223142004_add_more_german_area_codes.rb @@ -0,0 +1,58 @@ +# encoding: UTF-8 + +class AddMoreGermanAreaCodes < ActiveRecord::Migration + def up + # http://www.bundesnetzagentur.de/cln_1912/DE/Sachgebiete/Telekommunikation/RegulierungTelekommunikation/Nummernverwaltung/Nummernverwaltung_node.html + + germany = Country.find_by_name('Germany') + german_service_number_range = germany.phone_number_ranges.find_by_name('service_numbers') + + # Harmonisierte Dienste von sozialem Wert + # + (0..9).each do |x| + (0..9).each do |y| + (0..9).each do |z| + german_service_number_range.phone_numbers.create( + :name => "Harmonisierte Dienste von sozialem Wert", + :number => "116#{x}#{y}#{z}" + ) + end + end + end + + # Auskunftsdienste + # + (0..9).each do |x| + (0..9).each do |y| + german_service_number_range.phone_numbers.create( + :name => "Auskunftsdienste", + :number => "118#{x}#{y}" + ) + end + end + + # Online-Dienste + # + (0..9).each do |x| + (0..9).each do |y| + (0..9).each do |z| + AreaCode.create( + :country_id => germany.id, + :name => 'Online-Dienste', + :area_code => "19#{x}#{y}#{z}" + ) + end + end + end + + AreaCode.create(:country_id => germany.id, :name => 'Neuartige Dienste', :area_code => '12') + AreaCode.create(:country_id => germany.id, :name => 'Massenverkehrs-Dienste', :area_code => '137') + AreaCode.create(:country_id => germany.id, :name => 'Nutzergruppen', :area_code => '18') + AreaCode.create(:country_id => germany.id, :name => 'Internationale Virtuelle Private Netze', :area_code => '181') + AreaCode.create(:country_id => germany.id, :name => 'Nationale Teilnehmernummern', :area_code => '32') + AreaCode.create(:country_id => germany.id, :name => 'Anwählprogramme (Dialer)', :area_code => '9009') + end + + def down + end +end |