Yep version_table Set the name of the table holding the table version. Useful if the proxy is sharing a database within a project and during upgrades. Default value is “version”. Example of usage: version_table="version44"
That's what I was looking for, perfect!
Yes, I added accountcode and notes to my table for internal use, was just making notes on columns I need on the new version upgrade.
Thanks.
JR
On Tue, Jun 18, 2019 at 2:17 PM Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
like Alex said, you can have two version tables, one for each versions of kamailio you play with and use in config the core parameter to set the name of that table.
I am actually writing to say that address table never had accountcode and notes columns. Likely they were added in your deployment for other purposes or either the default column names were changed. The default column names are listed at:
https://kamailio.org/docs/db-tables/kamailio-db-5.2.x.html#gen-db-address
These were the same for rather long time, iirc the recent version number changed mainly due to with modifications done to the size, not due to new columns.
Cheers, Daniel
On 18.06.19 20:50, JR Richardson wrote:
Hey All,
I'm doing some upgrades and noticed database table version numbers have increased.
database table adjustments: | address | production ver 3 | upgrade 5.2 ver 6 | need to add accountcode and notes column | dispatcher | production ver 3 | upgrade 5.2 ver 4 | need to add attr column | trusted | production ver 5 | upgrade 5.2 ver 6 | need to add ruri_pattern and priority column
I run mysql master/slave so I'm concerned about the master database not having the correct version numbers or can I just update the version number in the table when I do the upgrade of the kamailio versions?
Thanks.
JR
It's probably also worth noting that Kamailio's DB layer offers "unpredictable" reactions to columns which are missing and which the given version expects to be there.
"Unpredictable" generally means a crash, but when it happens -- the presence of columns isn't always validated at boot time, depends on the module -- is the unpredictable part...
So, modernising your DB schema for built-in module tables, including seldom-used tables which are nevertheless formally used to back some module, is important when doing upgrades.
On Tue, Jun 18, 2019 at 02:46:27PM -0500, JR Richardson wrote:
Yep version_table Set the name of the table holding the table version. Useful if the proxy is sharing a database within a project and during upgrades. Default value is “version”. Example of usage: version_table="version44"
That's what I was looking for, perfect!
Yes, I added accountcode and notes to my table for internal use, was just making notes on columns I need on the new version upgrade.
Thanks.
JR
On Tue, Jun 18, 2019 at 2:17 PM Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
like Alex said, you can have two version tables, one for each versions of kamailio you play with and use in config the core parameter to set the name of that table.
I am actually writing to say that address table never had accountcode and notes columns. Likely they were added in your deployment for other purposes or either the default column names were changed. The default column names are listed at:
https://kamailio.org/docs/db-tables/kamailio-db-5.2.x.html#gen-db-address
These were the same for rather long time, iirc the recent version number changed mainly due to with modifications done to the size, not due to new columns.
Cheers, Daniel
On 18.06.19 20:50, JR Richardson wrote:
Hey All,
I'm doing some upgrades and noticed database table version numbers have increased.
database table adjustments: | address | production ver 3 | upgrade 5.2 ver 6 | need to add accountcode and notes column | dispatcher | production ver 3 | upgrade 5.2 ver 4 | need to add attr column | trusted | production ver 5 | upgrade 5.2 ver 6 | need to add ruri_pattern and priority column
I run mysql master/slave so I'm concerned about the master database not having the correct version numbers or can I just update the version number in the table when I do the upgrade of the kamailio versions?
Thanks.
JR
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On 18.06.19 21:50, Alex Balashov wrote:
It's probably also worth noting that Kamailio's DB layer offers "unpredictable" reactions to columns which are missing and which the given version expects to be there.
Where did you meet such situation? A missing but expected column should end up in an error at the sql query layer, because kamailio modules explicitely do select/insert/... with column names.
The only unpredictable situation with some modules may be when the column exist, but has a different type than expected. But a missing column should be handled because of the db query error.
Cheers, Daniel
"Unpredictable" generally means a crash, but when it happens -- the presence of columns isn't always validated at boot time, depends on the module -- is the unpredictable part...
So, modernising your DB schema for built-in module tables, including seldom-used tables which are nevertheless formally used to back some module, is important when doing upgrades.
On Tue, Jun 18, 2019 at 02:46:27PM -0500, JR Richardson wrote:
Yep version_table Set the name of the table holding the table version. Useful if the proxy is sharing a database within a project and during upgrades. Default value is “version”. Example of usage: version_table="version44"
That's what I was looking for, perfect!
Yes, I added accountcode and notes to my table for internal use, was just making notes on columns I need on the new version upgrade.
Thanks.
JR
On Tue, Jun 18, 2019 at 2:17 PM Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
like Alex said, you can have two version tables, one for each versions of kamailio you play with and use in config the core parameter to set the name of that table.
I am actually writing to say that address table never had accountcode and notes columns. Likely they were added in your deployment for other purposes or either the default column names were changed. The default column names are listed at:
https://kamailio.org/docs/db-tables/kamailio-db-5.2.x.html#gen-db-address
These were the same for rather long time, iirc the recent version number changed mainly due to with modifications done to the size, not due to new columns.
Cheers, Daniel
On 18.06.19 20:50, JR Richardson wrote:
Hey All,
I'm doing some upgrades and noticed database table version numbers have increased.
database table adjustments: | address | production ver 3 | upgrade 5.2 ver 6 | need to add accountcode and notes column | dispatcher | production ver 3 | upgrade 5.2 ver 4 | need to add attr column | trusted | production ver 5 | upgrade 5.2 ver 6 | need to add ruri_pattern and priority column
I run mysql master/slave so I'm concerned about the master database not having the correct version numbers or can I just update the version number in the table when I do the upgrade of the kamailio versions?
Thanks.
JR
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
On Tue, Jun 18, 2019 at 10:09:56PM +0200, Daniel-Constantin Mierla wrote:
Where did you meet such situation?
I wish I could remember. It's been in various times over the years, but I never filed a bug report--probably because I didn't really perceive it as a bug consciously. :-) If I had to guess, I think it was in usrloc.
On 18.06.19 22:11, Alex Balashov wrote:
On Tue, Jun 18, 2019 at 10:09:56PM +0200, Daniel-Constantin Mierla wrote:
Where did you meet such situation?
I wish I could remember. It's been in various times over the years, but I never filed a bug report--probably because I didn't really perceive it as a bug consciously. :-) If I had to guess, I think it was in usrloc.
I do not remember such issue reported or encountered for usrloc module, which is one quite popular. But it gets close to 20 years for usrloc, so a lot could have happened along the time ...
The version table is rather ancient basic check just to try to avoid having kamailio starting ok, and then at runtime printing a lot of error messages and not functioning properly. Probably it should be improved somehow -- db api v2 tried to come with another approach, but that direction was not followed much.
Cheers, Daniel
Hello All,
I need to do a version upgrade from 5 to 5.2. I read about the version_table parameter and i know i can create it and set the versions there. But where do i get the correct versions for the table? i.e.: location is version N?
Thanks all!
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
On Wed, Jun 19, 2019 at 8:35 AM Daniel-Constantin Mierla miconda@gmail.com wrote:
On 18.06.19 22:11, Alex Balashov wrote:
On Tue, Jun 18, 2019 at 10:09:56PM +0200, Daniel-Constantin Mierla wrote:
Where did you meet such situation?
I wish I could remember. It's been in various times over the years, but I never filed a bug report--probably because I didn't really perceive it as a bug consciously. :-) If I had to guess, I think it was in usrloc.
I do not remember such issue reported or encountered for usrloc module, which is one quite popular. But it gets close to 20 years for usrloc, so a lot could have happened along the time ...
The version table is rather ancient basic check just to try to avoid having kamailio starting ok, and then at runtime printing a lot of error messages and not functioning properly. Probably it should be improved somehow -- db api v2 tried to come with another approach, but that direction was not followed much.
Cheers, Daniel
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Nevermind, got it.
~# grep "INSERT.*version" /usr/share/kamailio/mysql/*
/usr/share/kamailio/mysql/acc-create.sql:INSERT INTO version (table_name, table_version) values ('acc','5'); /usr/share/kamailio/mysql/acc-create.sql:INSERT INTO version (table_name, table_version) values ('acc_cdrs','2'); /usr/share/kamailio/mysql/acc-create.sql:INSERT INTO version (table_name, table_version) values ('missed_calls','4'); /usr/share/kamailio/mysql/alias_db-create.sql:INSERT INTO version (table_name, table_version) values ('dbaliases','1'); /usr/share/kamailio/mysql/auth_db-create.sql:INSERT INTO version (table_name, table_version) values ('subscriber','7'); /usr/share/kamailio/mysql/avpops-create.sql:INSERT INTO version (table_name, table_version) values ('usr_preferences','2'); /usr/share/kamailio/mysql/carrierroute-create.sql:INSERT INTO version (table_name, table_version) values ('carrierroute','3'); /usr/share/kamailio/mysql/carrierroute-create.sql:INSERT INTO version (table_name, table_version) values ('carrierfailureroute','2'); /usr/share/kamailio/mysql/carrierroute-create.sql:INSERT INTO version (table_name, table_version) values ('carrier_name','1'); /usr/share/kamailio/mysql/carrierroute-create.sql:INSERT INTO version (table_name, table_version) values ('domain_name','1'); /usr/share/kamailio/mysql/cpl-create.sql:INSERT INTO version (table_name, table_version) values ('cpl','1'); /usr/share/kamailio/mysql/dialog-create.sql:INSERT INTO version (table_name, table_version) values ('dialog','7'); /usr/share/kamailio/mysql/dialog-create.sql:INSERT INTO version (table_name, table_version) values ('dialog_vars','1'); /usr/share/kamailio/mysql/dialplan-create.sql:INSERT INTO version (table_name, table_version) values ('dialplan','2'); /usr/share/kamailio/mysql/dispatcher-create.sql:INSERT INTO version (table_name, table_version) values ('dispatcher','4'); /usr/share/kamailio/mysql/domain-create.sql:INSERT INTO version (table_name, table_version) values ('domain','2'); /usr/share/kamailio/mysql/domain-create.sql:INSERT INTO version (table_name, table_version) values ('domain_attrs','1'); /usr/share/kamailio/mysql/domainpolicy-create.sql:INSERT INTO version (table_name, table_version) values ('domainpolicy','2'); /usr/share/kamailio/mysql/drouting-create.sql:INSERT INTO version (table_name, table_version) values ('dr_gateways','3'); /usr/share/kamailio/mysql/drouting-create.sql:INSERT INTO version (table_name, table_version) values ('dr_rules','3'); /usr/share/kamailio/mysql/drouting-create.sql:INSERT INTO version (table_name, table_version) values ('dr_gw_lists','1'); /usr/share/kamailio/mysql/drouting-create.sql:INSERT INTO version (table_name, table_version) values ('dr_groups','2'); /usr/share/kamailio/mysql/group-create.sql:INSERT INTO version (table_name, table_version) values ('grp','2'); /usr/share/kamailio/mysql/group-create.sql:INSERT INTO version (table_name, table_version) values ('re_grp','1'); /usr/share/kamailio/mysql/htable-create.sql:INSERT INTO version (table_name, table_version) values ('htable','2'); /usr/share/kamailio/mysql/imc-create.sql:INSERT INTO version (table_name, table_version) values ('imc_rooms','1'); /usr/share/kamailio/mysql/imc-create.sql:INSERT INTO version (table_name, table_version) values ('imc_members','1'); /usr/share/kamailio/mysql/ims_charging_create.sql:INSERT INTO version (table_name, table_version) values ('ro_session','6'); /usr/share/kamailio/mysql/ims_dialog-create.sql:INSERT INTO version (table_name, table_version) values ('dialog_in', 7), ('dialog_out', 7), ('dialog_vars', 7); /usr/share/kamailio/mysql/ims_usrloc_pcscf-create.sql:INSERT INTO version (table_name, table_version) values ('location','6'); /usr/share/kamailio/mysql/ims_usrloc_scscf-create.sql:INSERT INTO version (table_name, table_version) values ('contact','6'); /usr/share/kamailio/mysql/ims_usrloc_scscf-create.sql:INSERT INTO version (table_name, table_version) values ('impu','6'); /usr/share/kamailio/mysql/ims_usrloc_scscf-create.sql:INSERT INTO version (table_name, table_version) values ('impu_contact','6'); /usr/share/kamailio/mysql/ims_usrloc_scscf-create.sql:INSERT INTO version (table_name, table_version) values ('subscriber','6'); /usr/share/kamailio/mysql/ims_usrloc_scscf-create.sql:INSERT INTO version (table_name, table_version) values ('impu_subscriber','6'); /usr/share/kamailio/mysql/lcr-create.sql:INSERT INTO version (table_name, table_version) values ('lcr_gw','3'); /usr/share/kamailio/mysql/lcr-create.sql:INSERT INTO version (table_name, table_version) values ('lcr_rule_target','1'); /usr/share/kamailio/mysql/lcr-create.sql:INSERT INTO version (table_name, table_version) values ('lcr_rule','3'); /usr/share/kamailio/mysql/matrix-create.sql:INSERT INTO version (table_name, table_version) values ('matrix','1'); /usr/share/kamailio/mysql/mohqueue-create.sql:INSERT INTO version (table_name, table_version) values ('mohqcalls','1'); /usr/share/kamailio/mysql/mohqueue-create.sql:INSERT INTO version (table_name, table_version) values ('mohqueues','1'); /usr/share/kamailio/mysql/msilo-create.sql:INSERT INTO version (table_name, table_version) values ('silo','8'); /usr/share/kamailio/mysql/mtree-create.sql:INSERT INTO version (table_name, table_version) values ('mtree','1'); /usr/share/kamailio/mysql/mtree-create.sql:INSERT INTO version (table_name, table_version) values ('mtrees','2'); /usr/share/kamailio/mysql/pdt-create.sql:INSERT INTO version (table_name, table_version) values ('pdt','1'); /usr/share/kamailio/mysql/permissions-create.sql:INSERT INTO version (table_name, table_version) values ('trusted','6'); /usr/share/kamailio/mysql/permissions-create.sql:INSERT INTO version (table_name, table_version) values ('address','6'); /usr/share/kamailio/mysql/pipelimit-create.sql:INSERT INTO version (table_name, table_version) values ('pl_pipes','1'); /usr/share/kamailio/mysql/presence-create.sql:INSERT INTO version (table_name, table_version) values ('presentity','5'); /usr/share/kamailio/mysql/presence-create.sql:INSERT INTO version (table_name, table_version) values ('active_watchers','12'); /usr/share/kamailio/mysql/presence-create.sql:INSERT INTO version (table_name, table_version) values ('watchers','3'); /usr/share/kamailio/mysql/presence-create.sql:INSERT INTO version (table_name, table_version) values ('xcap','4'); /usr/share/kamailio/mysql/presence-create.sql:INSERT INTO version (table_name, table_version) values ('pua','7'); /usr/share/kamailio/mysql/purple-create.sql:INSERT INTO version (table_name, table_version) values ('purplemap','1'); /usr/share/kamailio/mysql/registrar-create.sql:INSERT INTO version (table_name, table_version) values ('aliases','8'); /usr/share/kamailio/mysql/rls-create.sql:INSERT INTO version (table_name, table_version) values ('rls_presentity','1'); /usr/share/kamailio/mysql/rls-create.sql:INSERT INTO version (table_name, table_version) values ('rls_watchers','3'); /usr/share/kamailio/mysql/rtpengine-create.sql:INSERT INTO version (table_name, table_version) values ('rtpengine','1'); /usr/share/kamailio/mysql/rtpproxy-create.sql:INSERT INTO version (table_name, table_version) values ('rtpproxy','1'); /usr/share/kamailio/mysql/sca-create.sql:INSERT INTO version (table_name, table_version) values ('sca_subscriptions','2'); /usr/share/kamailio/mysql/siptrace-create.sql:INSERT INTO version (table_name, table_version) values ('sip_trace','4'); /usr/share/kamailio/mysql/speeddial-create.sql:INSERT INTO version (table_name, table_version) values ('speed_dial','2'); /usr/share/kamailio/mysql/standard-create.sql:INSERT INTO version (table_name, table_version) values ('version','1'); /usr/share/kamailio/mysql/topos-create.sql:INSERT INTO version (table_name, table_version) values ('topos_d','1'); /usr/share/kamailio/mysql/topos-create.sql:INSERT INTO version (table_name, table_version) values ('topos_t','1'); /usr/share/kamailio/mysql/uac-create.sql:INSERT INTO version (table_name, table_version) values ('uacreg','3'); /usr/share/kamailio/mysql/uid_auth_db-create.sql:INSERT INTO version (table_name, table_version) values ('uid_credentials','7'); /usr/share/kamailio/mysql/uid_avp_db-create.sql:INSERT INTO version (table_name, table_version) values ('uid_user_attrs','3'); /usr/share/kamailio/mysql/uid_domain-create.sql:INSERT INTO version (table_name, table_version) values ('uid_domain','2'); /usr/share/kamailio/mysql/uid_domain-create.sql:INSERT INTO version (table_name, table_version) values ('uid_domain_attrs','1'); /usr/share/kamailio/mysql/uid_gflags-create.sql:INSERT INTO version (table_name, table_version) values ('uid_global_attrs','1'); /usr/share/kamailio/mysql/uid_uri_db-create.sql:INSERT INTO version (table_name, table_version) values ('uid_uri','3'); /usr/share/kamailio/mysql/uid_uri_db-create.sql:INSERT INTO version (table_name, table_version) values ('uid_uri_attrs','2'); /usr/share/kamailio/mysql/uri_db-create.sql:INSERT INTO version (table_name, table_version) values ('uri','1'); /usr/share/kamailio/mysql/userblacklist-create.sql:INSERT INTO version (table_name, table_version) values ('userblacklist','1'); /usr/share/kamailio/mysql/userblacklist-create.sql:INSERT INTO version (table_name, table_version) values ('globalblacklist','1'); /usr/share/kamailio/mysql/usrloc-create.sql:INSERT INTO version (table_name, table_version) values ('location','9'); /usr/share/kamailio/mysql/usrloc-create.sql:INSERT INTO version (table_name, table_version) values ('location_attrs','1');
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
On Fri, Nov 15, 2019 at 3:19 PM David Villasmil < david.villasmil.work@gmail.com> wrote:
Hello All,
I need to do a version upgrade from 5 to 5.2. I read about the version_table parameter and i know i can create it and set the versions there. But where do i get the correct versions for the table? i.e.: location is version N?
Thanks all!
Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337
On Wed, Jun 19, 2019 at 8:35 AM Daniel-Constantin Mierla < miconda@gmail.com> wrote:
On 18.06.19 22:11, Alex Balashov wrote:
On Tue, Jun 18, 2019 at 10:09:56PM +0200, Daniel-Constantin Mierla
wrote:
Where did you meet such situation?
I wish I could remember. It's been in various times over the years, but I never filed a bug report--probably because I didn't really perceive it as a bug consciously. :-) If I had to guess, I think it was in usrloc.
I do not remember such issue reported or encountered for usrloc module, which is one quite popular. But it gets close to 20 years for usrloc, so a lot could have happened along the time ...
The version table is rather ancient basic check just to try to avoid having kamailio starting ok, and then at runtime printing a lot of error messages and not functioning properly. Probably it should be improved somehow -- db api v2 tried to come with another approach, but that direction was not followed much.
Cheers, Daniel
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users