@@ 39-62 (lines=24) @@ | ||
36 | /** |
|
37 | * {@inheritdoc} |
|
38 | */ |
|
39 | public function dropDatabase($database) |
|
40 | { |
|
41 | try { |
|
42 | parent::dropDatabase($database); |
|
43 | } catch (DBALException $exception) { |
|
44 | $exception = $exception->getPrevious(); |
|
45 | ||
46 | if (! $exception instanceof DriverException) { |
|
47 | throw $exception; |
|
48 | } |
|
49 | ||
50 | // If we have a error code 1940 (ORA-01940), the drop database operation failed |
|
51 | // because of active connections on the database. |
|
52 | // To force dropping the database, we first have to close all active connections |
|
53 | // on that database and issue the drop database operation again. |
|
54 | if ($exception->getErrorCode() !== 1940) { |
|
55 | throw $exception; |
|
56 | } |
|
57 | ||
58 | $this->killUserSessions($database); |
|
59 | ||
60 | parent::dropDatabase($database); |
|
61 | } |
|
62 | } |
|
63 | ||
64 | /** |
|
65 | * {@inheritdoc} |
@@ 41-64 (lines=24) @@ | ||
38 | /** |
|
39 | * {@inheritdoc} |
|
40 | */ |
|
41 | public function dropDatabase($database) |
|
42 | { |
|
43 | try { |
|
44 | parent::dropDatabase($database); |
|
45 | } catch (DBALException $exception) { |
|
46 | $exception = $exception->getPrevious(); |
|
47 | ||
48 | if (! $exception instanceof DriverException) { |
|
49 | throw $exception; |
|
50 | } |
|
51 | ||
52 | // If we have a error code 3702, the drop database operation failed |
|
53 | // because of active connections on the database. |
|
54 | // To force dropping the database, we first have to close all active connections |
|
55 | // on that database and issue the drop database operation again. |
|
56 | if ($exception->getErrorCode() !== 3702) { |
|
57 | throw $exception; |
|
58 | } |
|
59 | ||
60 | $this->closeActiveDatabaseConnections($database); |
|
61 | ||
62 | parent::dropDatabase($database); |
|
63 | } |
|
64 | } |
|
65 | ||
66 | /** |
|
67 | * {@inheritdoc} |