summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20130212120729_create_parking_stalls.rb16
-rw-r--r--db/migrate/20130213082703_add_language_to_sip_account.rb5
-rw-r--r--db/migrate/20130213110000_add_sounds_to_parameters.rb10
-rw-r--r--db/migrate/20130215111526_create_sim_card_providers.rb20
-rw-r--r--db/migrate/20130215112028_create_sim_cards.rb18
-rw-r--r--db/migrate/20130215133749_add_sim_card_gs_parameter.rb9
-rw-r--r--db/schema.rb39
7 files changed, 116 insertions, 1 deletions
diff --git a/db/migrate/20130212120729_create_parking_stalls.rb b/db/migrate/20130212120729_create_parking_stalls.rb
new file mode 100644
index 0000000..7620942
--- /dev/null
+++ b/db/migrate/20130212120729_create_parking_stalls.rb
@@ -0,0 +1,16 @@
+class CreateParkingStalls < ActiveRecord::Migration
+ def self.up
+ create_table :parking_stalls do |t|
+ t.string :name
+ t.string :lot
+ t.integer :parking_stallable_id
+ t.string :parking_stallable_type
+ t.string :comment
+ t.timestamps
+ end
+ end
+
+ def self.down
+ drop_table :parking_stalls
+ end
+end
diff --git a/db/migrate/20130213082703_add_language_to_sip_account.rb b/db/migrate/20130213082703_add_language_to_sip_account.rb
new file mode 100644
index 0000000..24343ef
--- /dev/null
+++ b/db/migrate/20130213082703_add_language_to_sip_account.rb
@@ -0,0 +1,5 @@
+class AddLanguageToSipAccount < ActiveRecord::Migration
+ def change
+ add_column :sip_accounts, :language_code, :string
+ end
+end
diff --git a/db/migrate/20130213110000_add_sounds_to_parameters.rb b/db/migrate/20130213110000_add_sounds_to_parameters.rb
new file mode 100644
index 0000000..8c4cd94
--- /dev/null
+++ b/db/migrate/20130213110000_add_sounds_to_parameters.rb
@@ -0,0 +1,10 @@
+class AddSoundsToParameters < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'dialplan', :section => 'sounds', :name => 'en', :value => '/opt/freeswitch/sounds/en/us/callie', :class_type => 'String')
+ GsParameter.create(:entity => 'dialplan', :section => 'sounds', :name => 'de', :value => '/opt/freeswitch/sounds/de/de/callie', :class_type => 'String')
+ end
+
+ def down
+ GsParameter.where(:entity => 'dialplan', :section => 'sounds').destroy_all
+ end
+end
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
diff --git a/db/schema.rb b/db/schema.rb
index fc2b635..df55604 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130212071000) do
+ActiveRecord::Schema.define(:version => 20130215133749) do
create_table "access_authorizations", :force => true do |t|
t.string "access_authorizationable_type"
@@ -701,6 +701,16 @@ ActiveRecord::Schema.define(:version => 20130212071000) do
t.datetime "updated_at", :null => false
end
+ create_table "parking_stalls", :force => true do |t|
+ t.string "name"
+ t.string "lot"
+ t.integer "parking_stallable_id"
+ t.string "parking_stallable_type"
+ t.string "comment"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "phone_book_entries", :force => true do |t|
t.integer "phone_book_id"
t.string "first_name"
@@ -876,6 +886,32 @@ ActiveRecord::Schema.define(:version => 20130212071000) do
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
+ create_table "sim_card_providers", :force => true 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.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "sim_cards", :force => true 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.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
create_table "sip_accounts", :force => true do |t|
t.string "sip_accountable_type"
t.integer "sip_accountable_id"
@@ -899,6 +935,7 @@ ActiveRecord::Schema.define(:version => 20130212071000) do
t.integer "gs_node_original_id"
t.string "uuid"
t.boolean "is_native"
+ t.string "language_code"
end
add_index "sip_accounts", ["uuid"], :name => "index_sip_accounts_on_uuid"