reference: SQL_Sqllite3 changed to use SqlPerformScript

git-svn-id: svn://ultimatepp.org/upp/trunk@5325 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2012-09-07 11:11:27 +00:00
parent 884d22aa04
commit aae0f7b0f5

View file

@ -25,16 +25,15 @@ CONSOLE_APP_MAIN
// Update the schema to match the schema described in "simple.sch"
#ifdef _DEBUG
SqlSchema sch(SQLITE3);
StdStatementExecutor se(sqlite3);
All_Tables(sch);
if(sch.ScriptChanged(SqlSchema::UPGRADE))
Sqlite3PerformScript(sch.Upgrade(),se);
SqlPerformScript(sch.Upgrade());
if(sch.ScriptChanged(SqlSchema::ATTRIBUTES)) {
Sqlite3PerformScript(sch.Attributes(),se);
SqlPerformScript(sch.Attributes());
}
if(sch.ScriptChanged(SqlSchema::CONFIG)) {
Sqlite3PerformScript(sch.ConfigDrop(),se);
Sqlite3PerformScript(sch.Config(),se);
SqlPerformScript(sch.ConfigDrop());
SqlPerformScript(sch.Config());
}
sch.SaveNormal();
#endif