unique multi-column keys in sqlite, fixes #97

This commit is contained in:
Ondrej Zara
2017-01-17 11:33:44 +01:00
parent 3afa2f2476
commit 6ed40fdab7
+2 -6
View File
@@ -58,14 +58,10 @@
<!-- keys after table --> <!-- keys after table -->
<xsl:for-each select="key"> <xsl:for-each select="key">
<xsl:if test="@type = 'UNIQUE' or (@type = 'PRIMARY' and count(child::part) > 1)"> <xsl:if test="@type = 'UNIQUE' or (@type = 'PRIMARY' and count(child::part) &gt; 1)">
<xsl:text>, <xsl:text>,
</xsl:text> </xsl:text>
<xsl:choose> <xsl:text>UNIQUE (</xsl:text>
<xsl:when test="@type = 'PRIMARY'">PRIMARY KEY</xsl:when>
<xsl:when test="@type = 'UNIQUE'">UNIQUE</xsl:when>
</xsl:choose>
<xsl:text> (</xsl:text>
<xsl:for-each select="part"> <xsl:for-each select="part">
<xsl:value-of select="." /> <xsl:value-of select="." />