<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <div class="moz-cite-prefix">On 5/22/12 1:02 PM, Andreas Granig
      wrote:<br>
    </div>
    <blockquote cite="mid:4FBB7232.20305@sipwise.com" type="cite">
      <pre wrap="">Hi,

How does the generation of db creation scripts actually work? In the
past, I manually adapted all the files, which seemed pretty pointless
due to the existence of the xml definitions.</pre>
    </blockquote>
    once you modify the xml files in lib/srdb1/schema/ run:<br>
    <br>
    make dbschema<br>
    <br>
    Do it in the main folder with sources. It will regenerate affected
    scripts used by kamdbctl<br>
    <br>
    <br>
    <blockquote cite="mid:4FBB7232.20305@sipwise.com" type="cite">
      <pre wrap="">

So is there a make target or a script for that? Will this support all
existing db backends?</pre>
    </blockquote>
    <br>
    Yes, it should be valid for all db connectors developed through
    kamailio branch in the past.<br>
    <br>
    <blockquote cite="mid:4FBB7232.20305@sipwise.com" type="cite">
      <pre wrap="">

And what's the difference between lib/srdb1/schema and lib/srdb2/schema?</pre>
    </blockquote>
    <br>
    srdb2 is the db api used by modules developed via ser branch in the
    past, there should be the database structures for modules_s.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    &nbsp;<br>
    <blockquote cite="mid:4FBB7232.20305@sipwise.com" type="cite">
      <pre wrap="">

Thanks for clarification,
Andreas

On 05/22/2012 12:43 PM, Daniel-Constantin Mierla wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Module: sip-router
Branch: master
Commit: 861603806e72876e0348c25031bcd64892023a20
URL:    <a class="moz-txt-link-freetext" href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=861603806e72876e0348c25031bcd64892023a20">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=861603806e72876e0348c25031bcd64892023a20</a>

Author: Daniel-Constantin Mierla <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com">&lt;miconda@gmail.com&gt;</a>
Committer: Daniel-Constantin Mierla <a class="moz-txt-link-rfc2396E" href="mailto:miconda@gmail.com">&lt;miconda@gmail.com&gt;</a>
Date:   Tue May 22 12:41:05 2012 +0200

srdb1/dbschema: regenerated db creation scripts

- lcr_rule version update was not taken in consideration
- reported by Timo Ter&auml;s

---

 utils/kamctl/db_berkeley/kamailio/version |    2 +-
 utils/kamctl/db_sqlite/lcr-create.sql     |    2 +-
 utils/kamctl/dbtext/kamailio/version      |    2 +-
 utils/kamctl/mysql/lcr-create.sql         |    2 +-
 utils/kamctl/oracle/lcr-create.sql        |    2 +-
 utils/kamctl/postgres/lcr-create.sql      |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/utils/kamctl/db_berkeley/kamailio/version b/utils/kamctl/db_berkeley/kamailio/version
index 235d82b..c51ace4 100644
--- a/utils/kamctl/db_berkeley/kamailio/version
+++ b/utils/kamctl/db_berkeley/kamailio/version
@@ -63,7 +63,7 @@ imc_rooms|1
 lcr_gw|
 lcr_gw|2
 lcr_rule|
-lcr_rule|1
+lcr_rule|2
 lcr_rule_target|
 lcr_rule_target|1
 location|
diff --git a/utils/kamctl/db_sqlite/lcr-create.sql b/utils/kamctl/db_sqlite/lcr-create.sql
index 8493e26..63eb37d 100644
--- a/utils/kamctl/db_sqlite/lcr-create.sql
+++ b/utils/kamctl/db_sqlite/lcr-create.sql
@@ -31,7 +31,7 @@ CREATE TABLE lcr_rule_target (
 
 CREATE INDEX lcr_rule_target_lcr_id_idx ON lcr_rule_target (lcr_id);
 
-INSERT INTO version (table_name, table_version) values ('lcr_rule','1');
+INSERT INTO version (table_name, table_version) values ('lcr_rule','2');
 CREATE TABLE lcr_rule (
     id INTEGER PRIMARY KEY NOT NULL,
     lcr_id SMALLINT NOT NULL,
diff --git a/utils/kamctl/dbtext/kamailio/version b/utils/kamctl/dbtext/kamailio/version
index 31bf74b..0396a99 100644
--- a/utils/kamctl/dbtext/kamailio/version
+++ b/utils/kamctl/dbtext/kamailio/version
@@ -26,7 +26,7 @@ htable:2
 imc_members:1
 imc_rooms:1
 lcr_gw:2
-lcr_rule:1
+lcr_rule:2
 lcr_rule_target:1
 location:5
 matrix:1
diff --git a/utils/kamctl/mysql/lcr-create.sql b/utils/kamctl/mysql/lcr-create.sql
index f7dbf26..efa65b2 100644
--- a/utils/kamctl/mysql/lcr-create.sql
+++ b/utils/kamctl/mysql/lcr-create.sql
@@ -31,7 +31,7 @@ CREATE TABLE lcr_rule_target (
 
 CREATE INDEX lcr_id_idx ON lcr_rule_target (lcr_id);
 
-INSERT INTO version (table_name, table_version) values ('lcr_rule','1');
+INSERT INTO version (table_name, table_version) values ('lcr_rule','2');
 CREATE TABLE lcr_rule (
     id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
     lcr_id SMALLINT UNSIGNED NOT NULL,
diff --git a/utils/kamctl/oracle/lcr-create.sql b/utils/kamctl/oracle/lcr-create.sql
index 530a798..5fe88a0 100644
--- a/utils/kamctl/oracle/lcr-create.sql
+++ b/utils/kamctl/oracle/lcr-create.sql
@@ -47,7 +47,7 @@ BEGIN map2users('lcr_rule_target'); END;
 /
 CREATE INDEX lcr_rule_target_lcr_id_idx  ON lcr_rule_target (lcr_id);
 
-INSERT INTO version (table_name, table_version) values ('lcr_rule','1');
+INSERT INTO version (table_name, table_version) values ('lcr_rule','2');
 CREATE TABLE lcr_rule (
     id NUMBER(10) PRIMARY KEY,
     lcr_id NUMBER(5),
diff --git a/utils/kamctl/postgres/lcr-create.sql b/utils/kamctl/postgres/lcr-create.sql
index 52f51c5..958213a 100644
--- a/utils/kamctl/postgres/lcr-create.sql
+++ b/utils/kamctl/postgres/lcr-create.sql
@@ -31,7 +31,7 @@ CREATE TABLE lcr_rule_target (
 
 CREATE INDEX lcr_rule_target_lcr_id_idx ON lcr_rule_target (lcr_id);
 
-INSERT INTO version (table_name, table_version) values ('lcr_rule','1');
+INSERT INTO version (table_name, table_version) values ('lcr_rule','2');
 CREATE TABLE lcr_rule (
     id SERIAL PRIMARY KEY NOT NULL,
     lcr_id SMALLINT NOT NULL,


_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
sr-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-dev@lists.sip-router.org">sr-dev@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
    <br>
    <br>
  </body>
</html>