File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 7
7
use Doctrine \DBAL \Connection ;
8
8
use Doctrine \DBAL \DriverManager ;
9
9
use Doctrine \DBAL \Event \Listeners \OracleSessionInit ;
10
- use function strtoupper ;
11
10
12
11
class ConnectionFactory
13
12
{
@@ -33,7 +32,7 @@ public static function resetDatabase(
33
32
34
33
// When dropAndCreateDatabase is run several times, Oracle can have some issues releasing the TDBM user.
35
34
// Let's forcefully delete the connection!
36
- $ adminConn ->exec ("select 'alter system kill session ''' || sid || ',' || serial# || ''';' from v \$session where username = ' " .strtoupper ($ dbName )."' " );
35
+ // $adminConn->exec("select 'alter system kill session ''' || sid || ',' || serial# || ''';' from v\$session where username = '".strtoupper($dbName)."'");
37
36
38
37
$ adminConn ->getSchemaManager ()->dropAndCreateDatabase ($ dbName );
39
38
Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ public static function setUpBeforeClass(): void
89
89
$ GLOBALS ['db_name ' ] ?? null
90
90
);
91
91
92
+ self ::$ dbConnection = $ dbConnection ;
93
+
92
94
self ::initSchema ($ dbConnection );
93
95
}
94
96
@@ -415,6 +417,7 @@ private static function initSchema(Connection $connection): void
415
417
$ sqlStmts = $ toSchema ->getMigrateFromSql ($ fromSchema , $ connection ->getDatabasePlatform ());
416
418
417
419
foreach ($ sqlStmts as $ sqlStmt ) {
420
+ //echo $sqlStmt."\n";
418
421
$ connection ->exec ($ sqlStmt );
419
422
}
420
423
You can’t perform that action at this time.
0 commit comments