mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-09-05 17:44:55 -06:00
reference: Postgres.cpp changed to use SqlRunScript
git-svn-id: svn://ultimatepp.org/upp/trunk@5323 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
4fa78d11cd
commit
c61a4d9108
1 changed files with 6 additions and 8 deletions
|
|
@ -28,20 +28,21 @@ bool PostgreSQLTest::OpenDB()
|
|||
m_session.SetTrace();
|
||||
#endif
|
||||
|
||||
SQL = m_session;
|
||||
|
||||
//schema
|
||||
Progress p;
|
||||
p.SetText(t_("Creating _DEBUG database"));
|
||||
SqlSchema sch(PGSQL);
|
||||
StdStatementExecutor se(m_session);
|
||||
All_Tables(sch);
|
||||
if(sch.ScriptChanged(SqlSchema::UPGRADE))
|
||||
PostgreSQLPerformScript(sch.Upgrade(),se, p);
|
||||
SqlPerformScript(sch.Upgrade(), p);
|
||||
if(sch.ScriptChanged(SqlSchema::ATTRIBUTES)) {
|
||||
PostgreSQLPerformScript(sch.Attributes(),se, p);
|
||||
SqlPerformScript(sch.Attributes(), p);
|
||||
}
|
||||
if(sch.ScriptChanged(SqlSchema::CONFIG)) {
|
||||
PostgreSQLPerformScript(sch.ConfigDrop(),se, p);
|
||||
PostgreSQLPerformScript(sch.Config(),se, p);
|
||||
SqlPerformScript(sch.ConfigDrop(), p);
|
||||
SqlPerformScript(sch.Config(), p);
|
||||
}
|
||||
sch.SaveNormal();
|
||||
|
||||
|
|
@ -78,9 +79,6 @@ void PostgreSQLTest::ShowTestData()
|
|||
m_array.Query();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
GUI_APP_MAIN
|
||||
{
|
||||
PostgreSQLTest dlg;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue