Commits

Yury Shulaev committed 5460216

improve MySQL export output

Comments (0)

Files changed (1)

db/mysql/output.xsl

 	<xsl:for-each select="table">
 	<xsl:text>-- ---
 -- Table '</xsl:text>
-	<xsl:value-of select="@name" />
+	<xsl:value-of select="@name" /><xsl:text>'</xsl:text>
 	<xsl:if test="comment">
+		<xsl:text> </xsl:text>
 		<xsl:call-template name="replace-substring">
 			<xsl:with-param name="value" select="comment" />
 			<xsl:with-param name="from" select='"&apos;"' />
 
 </xsl:text>
 
-<xsl:text>DROP TABLE IF EXISTS `</xsl:text>
+<xsl:text>-- DROP TABLE `</xsl:text>
 		<xsl:value-of select="@name" />
 		<xsl:text>`;
 
 		</xsl:for-each>
 
 		<xsl:text>
-)</xsl:text>
+) ENGINE=InnoDB DEFAULT CHARSET=utf8</xsl:text>
 
 
 
 	</xsl:for-each>
 
 <xsl:text>-- ---
--- Table Properties
--- ---
-
-</xsl:text>
-	<xsl:for-each select="table">
-	<xsl:text>ALTER TABLE `</xsl:text><xsl:value-of select="@name" />
-	<xsl:text>` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
-</xsl:text>
-	</xsl:for-each>
-
-<xsl:text>
--- ---
 -- Foreign Keys
 -- ---
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.