[sr-dev] git:master:e03b12a8: core: stylesheet for generating db schema updated for version insert

Daniel-Constantin Mierla miconda at gmail.com
Fri Dec 4 22:00:23 CET 2015


Module: kamailio
Branch: master
Commit: e03b12a80d6ce2f846f757004dff87d5e770c3b6
URL: https://github.com/kamailio/kamailio/commit/e03b12a80d6ce2f846f757004dff87d5e770c3b6

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2015-12-04T21:57:44+01:00

core: stylesheet for generating db schema updated for version insert

- version is inserted after the table was succesfully created
- avoid version record without table

---

Modified: doc/stylesheets/dbschema_k/xsl/sql.xsl

---

Diff:  https://github.com/kamailio/kamailio/commit/e03b12a80d6ce2f846f757004dff87d5e770c3b6.diff
Patch: https://github.com/kamailio/kamailio/commit/e03b12a80d6ce2f846f757004dff87d5e770c3b6.patch

---

diff --git a/doc/stylesheets/dbschema_k/xsl/sql.xsl b/doc/stylesheets/dbschema_k/xsl/sql.xsl
index ba55a5e..fb7f069 100644
--- a/doc/stylesheets/dbschema_k/xsl/sql.xsl
+++ b/doc/stylesheets/dbschema_k/xsl/sql.xsl
@@ -51,9 +51,6 @@
 	    <xsl:call-template name="get-name"/>
 	</xsl:variable>
 
-	<!-- Create row in version table -->
-	<xsl:apply-templates select="version"/>
-
 	<xsl:text>CREATE TABLE </xsl:text>
 	<xsl:call-template name="quotechar"/>
 	<xsl:value-of select="$table.name"/>
@@ -73,11 +70,16 @@
 
 	<xsl:call-template name="table.close"/>
 
+	<!-- Create indexes for table -->
 	<xsl:for-each select="index[count(child::unique)=0]">
 	    <xsl:if test="not(child::primary)">
 	        <xsl:call-template name="create_index"/>
 	    </xsl:if>
 	</xsl:for-each>
+	<!-- Create row in version table -->
+	<xsl:apply-templates select="version"/>
+	<xsl:text>&#x0A;</xsl:text>
+
     </xsl:template>
 
 <!-- ################ /TABLE ################  -->




More information about the sr-dev mailing list