summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-28 14:17:52 +0100
committerJulian Pawlowski <julian.pawlowski@gmail.com>2013-01-28 14:17:52 +0100
commit8aa7de2636dcd22781b623d5c9270f5ecf8b85c2 (patch)
tree1bb5dc36fb28c96ad9be9a2357d380c2c24ee31e /db/migrate
parent39aa7132ceed3d4beab3a9b828e571bbfc67c07e (diff)
parent600574759573e48da9f5f82d4ff8a863b6830c95 (diff)
Merge branch 'develop'5.1-beta2
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb6
-rw-r--r--db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb11
-rw-r--r--db/migrate/20130124125238_add_default_user_groups_for_new_users.rb9
-rw-r--r--db/migrate/20130124175109_show_admin_auto_online_help.rb9
-rw-r--r--db/migrate/20130125103500_add_voicemail_storage_parameter.rb9
-rw-r--r--db/migrate/20130125104000_add_dump_variables_parameter.rb9
-rw-r--r--db/migrate/20130127073800_add_dingaling_parameter.rb10
-rw-r--r--db/migrate/20130128121800_create_sip_registrations.rb53
8 files changed, 116 insertions, 0 deletions
diff --git a/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb b/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb
new file mode 100644
index 0000000..46b4884
--- /dev/null
+++ b/db/migrate/20130124105613_add_default_company_name_to_gemeinschaft_setup.rb
@@ -0,0 +1,6 @@
+class AddDefaultCompanyNameToGemeinschaftSetup < ActiveRecord::Migration
+ def change
+ add_column :gemeinschaft_setups, :default_company_name, :string
+ add_column :gemeinschaft_setups, :default_system_email, :string
+ end
+end
diff --git a/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb
new file mode 100644
index 0000000..6bbac04
--- /dev/null
+++ b/db/migrate/20130124123128_add_mobile_max_string_length_parameter.rb
@@ -0,0 +1,11 @@
+class AddMobileMaxStringLengthParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:name => 'MOBILE_MAX_STRING_LENGTH', :section => 'HTML', :value => '8', :class_type => 'Integer', :description => 'Max length of a string on a mobile devise.')
+ GsParameter.create(:name => 'DESKTOP_MAX_STRING_LENGTH', :section => 'HTML', :value => '30', :class_type => 'Integer', :description => 'Max length of a string on a desktop devise.')
+ end
+
+ def down
+ GsParameter.where(:name => 'MOBILE_MAX_STRING_LENGTH').destroy_all
+ GsParameter.where(:name => 'DESKTOP_MAX_STRING_LENGTH').destroy_all
+ end
+end
diff --git a/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb
new file mode 100644
index 0000000..d2700d6
--- /dev/null
+++ b/db/migrate/20130124125238_add_default_user_groups_for_new_users.rb
@@ -0,0 +1,9 @@
+class AddDefaultUserGroupsForNewUsers < ActiveRecord::Migration
+ def up
+ GsParameter.create(:name => 'DEFAULT_USER_GROUPS_IDS', :section => 'New user defaults', :value => "---\n- 3\n", :class_type => 'YAML', :description => 'Default user group ids for a new user.')
+ end
+
+ def down
+ GsParameter.where(:name => 'DEFAULT_USER_GROUPS_IDS').destroy_all
+ end
+end
diff --git a/db/migrate/20130124175109_show_admin_auto_online_help.rb b/db/migrate/20130124175109_show_admin_auto_online_help.rb
new file mode 100644
index 0000000..9c3f733
--- /dev/null
+++ b/db/migrate/20130124175109_show_admin_auto_online_help.rb
@@ -0,0 +1,9 @@
+class ShowAdminAutoOnlineHelp < ActiveRecord::Migration
+ def up
+ GsParameter.create(:name => 'AUTO_ADMIN_ONLINE_HELP', :section => 'Documentation', :value => 'true', :class_type => 'Boolean', :description => 'Gemeinschaft will include tips and help whenever it seems fit.')
+ end
+
+ def down
+ GsParameter.where(:name => 'AUTO_ADMIN_ONLINE_HELP').destroy_all
+ end
+end
diff --git a/db/migrate/20130125103500_add_voicemail_storage_parameter.rb b/db/migrate/20130125103500_add_voicemail_storage_parameter.rb
new file mode 100644
index 0000000..35e56af
--- /dev/null
+++ b/db/migrate/20130125103500_add_voicemail_storage_parameter.rb
@@ -0,0 +1,9 @@
+class AddVoicemailStorageParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir', :value => '/var/lib/freeswitch/voicemail', :class_type => 'String', :description => 'Directory where voicemail messages are stored.')
+ end
+
+ def down
+ GsParameter.where(:entity => 'voicemail', :section => 'parameters', :name => 'storage-dir').destroy_all
+ end
+end
diff --git a/db/migrate/20130125104000_add_dump_variables_parameter.rb b/db/migrate/20130125104000_add_dump_variables_parameter.rb
new file mode 100644
index 0000000..cbd85ef
--- /dev/null
+++ b/db/migrate/20130125104000_add_dump_variables_parameter.rb
@@ -0,0 +1,9 @@
+class AddDumpVariablesParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'dialplan', :section => 'parameters', :name => 'dump_variables', :value => 'false', :class_type => 'Boolean', :description => 'Log dialplan variables.')
+ end
+
+ def down
+ GsParameter.where(:entity => 'dialplan', :section => 'parameters', :name => 'dump_variables').destroy_all
+ end
+end
diff --git a/db/migrate/20130127073800_add_dingaling_parameter.rb b/db/migrate/20130127073800_add_dingaling_parameter.rb
new file mode 100644
index 0000000..ff5bd7c
--- /dev/null
+++ b/db/migrate/20130127073800_add_dingaling_parameter.rb
@@ -0,0 +1,10 @@
+class AddDingalingParameter < ActiveRecord::Migration
+ def up
+ GsParameter.create(:entity => 'dingaling', :section => 'parameters', :name => 'debug', :value => '0', :class_type => 'Integer', :description => 'Debug level.')
+ GsParameter.create(:entity => 'dingaling', :section => 'parameters', :name => 'codec-prefs', :value => 'PCMA,PCMU', :class_type => 'String', :description => 'Codec preferences.')
+ end
+
+ def down
+ GsParameter.where(:entity => 'dingaling', :section => 'parameters').destroy_all
+ end
+end
diff --git a/db/migrate/20130128121800_create_sip_registrations.rb b/db/migrate/20130128121800_create_sip_registrations.rb
new file mode 100644
index 0000000..473418e
--- /dev/null
+++ b/db/migrate/20130128121800_create_sip_registrations.rb
@@ -0,0 +1,53 @@
+class CreateSipRegistrations < ActiveRecord::Migration
+ def self.up
+ if !(ActiveRecord::Base.connection.table_exists? 'sip_registrations')
+ create_table :sip_registrations, :id => false do |t|
+ t.string :call_id, :limit => '255'
+ t.string :sip_user, :limit => '255'
+ t.string :sip_host, :limit => '255'
+ t.string :presence_hosts, :limit => '255'
+ t.string :contact, :limit => '1024'
+ t.string :status, :limit => '255'
+ t.string :rpid, :limit => '255'
+ t.integer :expires
+ t.string :user_agent, :limit => '255'
+ t.string :server_user, :limit => '255'
+ t.string :server_host, :limit => '255'
+ t.string :profile_name, :limit => '255'
+ t.string :hostname, :limit => '255'
+ t.string :network_ip, :limit => '255'
+ t.string :network_port, :limit => '6'
+ t.string :sip_username, :limit => '255'
+ t.string :sip_realm, :limit => '255'
+ t.string :mwi_user, :limit => '255'
+ t.string :mwi_host, :limit => '255'
+ t.string :orig_server_host, :limit => '255'
+ t.string :orig_hostname, :limit => '255'
+ t.string :sub_host, :limit => '255'
+ end
+
+ add_index :sip_registrations, [ :call_id ], :name => 'sr_call_id'
+ add_index :sip_registrations, [ :sip_user ], :name => 'sr_sip_user'
+ add_index :sip_registrations, [ :sip_host ], :name => 'sr_sip_host'
+ add_index :sip_registrations, [ :sub_host ], :name => 'sr_sub_host'
+ add_index :sip_registrations, [ :mwi_user ], :name => 'sr_mwi_user'
+ add_index :sip_registrations, [ :mwi_host ], :name => 'sr_mwi_host'
+ add_index :sip_registrations, [ :profile_name ], :name => 'sr_profile_name'
+ add_index :sip_registrations, [ :presence_hosts ], :name => 'sr_presence_hosts'
+ add_index :sip_registrations, [ :contact ], :name => 'sr_contact'
+ add_index :sip_registrations, [ :expires ], :name => 'sr_expires'
+ add_index :sip_registrations, [ :hostname ], :name => 'sr_hostname'
+ add_index :sip_registrations, [ :status ], :name => 'sr_status'
+ add_index :sip_registrations, [ :network_ip ], :name => 'sr_network_ip'
+ add_index :sip_registrations, [ :network_port ], :name => 'sr_network_port'
+ add_index :sip_registrations, [ :sip_username ], :name => 'sr_sip_username'
+ add_index :sip_registrations, [ :sip_realm ], :name => 'sr_sip_realm'
+ add_index :sip_registrations, [ :orig_server_host ], :name => 'sr_orig_server_host'
+ add_index :sip_registrations, [ :orig_hostname ], :name => 'sr_orig_hostname'
+ end
+ end
+
+ def self.down
+ drop_table :sip_registrations
+ end
+end