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
This commit is contained in:
cxl 2012-10-02 06:00:13 +00:00
parent 063f9e3622
commit 5c2f8a2e9d

View file

@ -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";