summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-28 13:36:27 +0100
committerspag <spag@golwen.net>2013-01-28 13:36:27 +0100
commitfd95d2c2fcc50418cdb23f34b21bcfe04d9cc1de (patch)
tree20dd6e2b9e3a822a63aff955b5ee919c21625c06
parent585c725c295b119d6299e8a3081dd4229e31e03d (diff)
create_sip_registrations migration
-rw-r--r--db/migrate/20130128121800_create_sip_registrations.rb51
1 files changed, 51 insertions, 0 deletions
diff --git a/db/migrate/20130128121800_create_sip_registrations.rb b/db/migrate/20130128121800_create_sip_registrations.rb
new file mode 100644
index 0000000..4157b84
--- /dev/null
+++ b/db/migrate/20130128121800_create_sip_registrations.rb
@@ -0,0 +1,51 @@
+class CreateSipRegistrations < ActiveRecord::Migration
+ def self.up
+ 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
+
+ def self.down
+ drop_table :sip_registrations
+ end
+end