diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-06-11 19:02:34 +0400 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-07-15 19:04:50 +0400 |
commit | 078637130e540a93d59fa9ff6bcad93a1ef70128 (patch) | |
tree | 8b9ce0e57ae601142aa00b9fa60c9434d8a06b00 /lib/private/db.php | |
parent | 3113e99c904150ce55fa82f9b7d479664ee9daa1 (diff) |
- Added test to trigger index id error
- re-enable encryption migration tests
- sqlite requires reconnect after schema changes
Backport of 10a2955 from master
Diffstat (limited to 'lib/private/db.php')
-rw-r--r-- | lib/private/db.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/private/db.php b/lib/private/db.php index 6aaf31a30cd..221a369cad2 100644 --- a/lib/private/db.php +++ b/lib/private/db.php @@ -106,6 +106,16 @@ class OC_DB { } /** + * The existing database connection is closed and connected again + */ + public static function reconnect() { + if(self::$connection) { + self::$connection->close(); + self::$connection->connect(); + } + } + + /** * @return \OC\DB\Connection */ static public function getConnection() { |