Пример #1
0
 def _cleanupOldData():
     startTxn = store.newTransaction("test_dbUpgrades")
     if startTxn.dialect == POSTGRES_DIALECT:
         yield startTxn.execSQL("set search_path to public")
         yield startTxn.execSQL("drop schema if exists test_dbUpgrades cascade")
     elif startTxn.dialect == ORACLE_DIALECT:
         yield cleanDatabase(startTxn)
     yield startTxn.commit()
Пример #2
0
 def _unloadOldData():
     startTxn = store.newTransaction("test_dbUpgrades")
     if startTxn.dbtype.dialect == POSTGRES_DIALECT:
         yield startTxn.execSQL("set search_path to public")
         yield startTxn.execSQL("drop schema test_dbUpgrades cascade")
     elif startTxn.dbtype.dialect == ORACLE_DIALECT:
         yield cleanDatabase(startTxn)
     yield startTxn.commit()
Пример #3
0
    def cleanUp(self):
        startTxn = self.store.newTransaction("test_dbUpgrades")
        if startTxn.dialect == POSTGRES_DIALECT:
            yield startTxn.execSQL("set search_path to public")
            yield startTxn.execSQL("drop schema test_dbUpgrades cascade")
        else:
            yield cleanDatabase(startTxn)

        yield startTxn.commit()
Пример #4
0
    def cleanUp(self):
        startTxn = self.store.newTransaction("test_dbUpgrades")
        if startTxn.dialect == POSTGRES_DIALECT:
            yield startTxn.execSQL("set search_path to public")
            yield startTxn.execSQL("drop schema test_dbUpgrades cascade")
        else:
            yield cleanDatabase(startTxn)

        yield startTxn.commit()