From 3d11d0a3a047a12bfd40b61252e269cabac76225 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 15 Feb 2013 14:49:16 +0100 Subject: Basic structure for sim_cards and sim_card_providers. --- .../20130215111526_create_sim_card_providers.rb | 20 ++++++++++++++++++++ db/migrate/20130215112028_create_sim_cards.rb | 18 ++++++++++++++++++ .../20130215133749_add_sim_card_gs_parameter.rb | 9 +++++++++ 3 files changed, 47 insertions(+) create mode 100644 db/migrate/20130215111526_create_sim_card_providers.rb create mode 100644 db/migrate/20130215112028_create_sim_cards.rb create mode 100644 db/migrate/20130215133749_add_sim_card_gs_parameter.rb (limited to 'db/migrate') diff --git a/db/migrate/20130215111526_create_sim_card_providers.rb b/db/migrate/20130215111526_create_sim_card_providers.rb new file mode 100644 index 0000000..b4e0f0e --- /dev/null +++ b/db/migrate/20130215111526_create_sim_card_providers.rb @@ -0,0 +1,20 @@ +class CreateSimCardProviders < ActiveRecord::Migration + def self.up + create_table :sim_card_providers do |t| + t.string :name + t.string :homepage_url + t.string :docu_url + t.string :api_server_url + t.string :api_username + t.string :api_password + t.string :ref + t.string :sip_server + t.boolean :include_order_card_function + t.timestamps + end + end + + def self.down + drop_table :sim_card_providers + end +end diff --git a/db/migrate/20130215112028_create_sim_cards.rb b/db/migrate/20130215112028_create_sim_cards.rb new file mode 100644 index 0000000..8962a1f --- /dev/null +++ b/db/migrate/20130215112028_create_sim_cards.rb @@ -0,0 +1,18 @@ +class CreateSimCards < ActiveRecord::Migration + def self.up + create_table :sim_cards do |t| + t.integer :sim_card_provider_id + t.string :sim_number + t.boolean :auto_order_card + t.integer :sip_account_id + t.string :auth_key + t.string :state + t.text :log + t.timestamps + end + end + + def self.down + drop_table :sim_cards + end +end diff --git a/db/migrate/20130215133749_add_sim_card_gs_parameter.rb b/db/migrate/20130215133749_add_sim_card_gs_parameter.rb new file mode 100644 index 0000000..9b0bbba --- /dev/null +++ b/db/migrate/20130215133749_add_sim_card_gs_parameter.rb @@ -0,0 +1,9 @@ +class AddSimCardGsParameter < ActiveRecord::Migration + def up + GsParameter.create(:name => 'SIM_CARDS', :section => 'System defaults', :value => 'false', :class_type => 'Boolean', :description => 'Should it be possible to use SIM cards as SIP account users.') + end + + def down + GsParameter.where(:name => 'SIM_CARDS').destroy_all + end +end -- cgit v1.2.3