[OpenSIPS-Users] Upgrade error from 1.5.3 to 1.6.3 - table version mismatch

Andrew Pogrebennyk andrew.pogrebennyk at portaone.com
Tue Aug 10 22:23:18 CEST 2010


On 10.08.2010 23:21, Gavin Henry wrote:
> "opensipsdbctl migrate opensips_1_5 opensips_1_6" was used and there
> was one error with the subscriber db which is actually a stored
> procedure calling an Asterisk realtime table.
> 
> Is there a guide to migrate the SQL with out using the above tool?

Gavin,
I sometimes checkout two versions with svn and run diff - you are 
correct the structure of dialog table has changed in 1.6.3, not sure why 
opensipsdbctl migrate .. did not convert it:

diff -ruN opensips_1_5/scripts/mysql/dialog-create.sql 
opensips_1_6/scripts/mysql/dialog-create.sql
--- opensips_1_5/scripts/mysql/dialog-create.sql        2010-08-04 
17:11:48.000000000 +0300
+++ opensips_1_6/scripts/mysql/dialog-create.sql        2010-08-04 
17:11:48.000000000 +0300
@@ -1,4 +1,4 @@
-INSERT INTO version (table_name, table_version) values ('dialog','3');
+INSERT INTO version (table_name, table_version) values ('dialog','4');
  CREATE TABLE dialog (
      id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
      hash_entry INT(10) UNSIGNED NOT NULL,
@@ -18,7 +18,10 @@
      callee_sock CHAR(64) NOT NULL,
      state INT(10) UNSIGNED NOT NULL,
      start_time INT(10) UNSIGNED NOT NULL,
-    timeout INT(10) UNSIGNED NOT NULL
+    timeout INT(10) UNSIGNED NOT NULL,
+    vars TEXT(512) DEFAULT NULL,
+    profiles TEXT(512) DEFAULT NULL,
+    script_flags INT(10) UNSIGNED DEFAULT 0 NOT NULL
  ) ENGINE=MyISAM;


-- 
Sincerely,
Andrew Pogrebennyk



More information about the Users mailing list