From 5c2f8a2e9d1716440e8d8002b985cf6cc1c8b516 Mon Sep 17 00:00:00 2001 From: cxl Date: Tue, 2 Oct 2012 06:00:13 +0000 Subject: [PATCH] Sql: MySql schema now using same alter table add column as Sqlite3 git-svn-id: svn://ultimatepp.org/upp/trunk@5401 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Sql/SqlSchema.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/uppsrc/Sql/SqlSchema.cpp b/uppsrc/Sql/SqlSchema.cpp index 8497055dd..03ab32661 100644 --- a/uppsrc/Sql/SqlSchema.cpp +++ b/uppsrc/Sql/SqlSchema.cpp @@ -22,9 +22,11 @@ void SqlSchema::FlushColumn() { Upgrade() << Expand("alter table @t add ") << cn << ";\n"; Upgrade() << Expand("alter table @t alter column ") << cd << ";\n"; } - else if (dialect == SQLITE3) + else + if (dialect == SQLITE3 || dialect == MY_SQL) Upgrade() << Expand("alter table @t add ") << cd << ";\n"; - else if (dialect == PGSQL) + else + if (dialect == PGSQL) Upgrade() << Expand("alter table @t add \n") << cd << "\n;\n\n"; else Upgrade() << Expand("alter table @t add (\n") << cd << "\n);\n\n";