changeset 884:ced093080e17

Check for existence of sequences (MySQL)
author Adam Chlipala <adamc@hcoop.net>
date Fri, 17 Jul 2009 14:04:05 -0400
parents 467285bb5578
children e6070333d8a8
files src/mysql.sml
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/mysql.sml	Fri Jul 17 13:19:41 2009 -0400
+++ b/src/mysql.sml	Fri Jul 17 14:04:05 2009 -0400
@@ -413,6 +413,8 @@
                       newline,
                       newline,
                       p_list_sep newline (checkRel ("tables", true)) tables,
+                      p_list_sep newline (fn name => checkRel ("tables", true)
+                                                              (name, [("id", Settings.Client)])) sequences,
                       p_list_sep newline (checkRel ("views", false)) views,
                       string "}",
                       newline,
@@ -1444,7 +1446,7 @@
                   p_cast = p_cast,
                   p_blank = p_blank,
                   supportsDeleteAs = false,
-                  createSequence = fn s => "CREATE TABLE " ^ s ^ " (id INTEGER PRIMARY KEY AUTO_INCREMENT)",
+                  createSequence = fn s => "CREATE TABLE " ^ s ^ " (uw_id INTEGER PRIMARY KEY AUTO_INCREMENT)",
                   textKeysNeedLengths = true,
                   supportsNextval = false,
                   supportsNestedPrepared = false,