@@ 5682-5699 (lines=18) @@ | ||
5679 | /** |
|
5680 | * @see QueryWriter::wipeAll |
|
5681 | */ |
|
5682 | public function wipeAll() |
|
5683 | { |
|
5684 | $this->adapter->exec( 'SET FOREIGN_KEY_CHECKS = 0;' ); |
|
5685 | ||
5686 | foreach ( $this->getTables() as $t ) { |
|
5687 | try { |
|
5688 | $this->adapter->exec( "DROP TABLE IF EXISTS `$t`" ); |
|
5689 | } catch ( SQLException $e ) { |
|
5690 | } |
|
5691 | ||
5692 | try { |
|
5693 | $this->adapter->exec( "DROP VIEW IF EXISTS `$t`" ); |
|
5694 | } catch ( SQLException $e ) { |
|
5695 | } |
|
5696 | } |
|
5697 | ||
5698 | $this->adapter->exec( 'SET FOREIGN_KEY_CHECKS = 1;' ); |
|
5699 | } |
|
5700 | } |
|
5701 | } |
|
5702 | ||
@@ 6118-6135 (lines=18) @@ | ||
6115 | /** |
|
6116 | * @see QueryWriter::wipeAll |
|
6117 | */ |
|
6118 | public function wipeAll() |
|
6119 | { |
|
6120 | $this->adapter->exec( 'PRAGMA foreign_keys = 0 ' ); |
|
6121 | ||
6122 | foreach ( $this->getTables() as $t ) { |
|
6123 | try { |
|
6124 | $this->adapter->exec( "DROP TABLE IF EXISTS `$t`" ); |
|
6125 | } catch ( SQLException $e ) { |
|
6126 | } |
|
6127 | ||
6128 | try { |
|
6129 | $this->adapter->exec( "DROP TABLE IF EXISTS `$t`" ); |
|
6130 | } catch ( SQLException $e ) { |
|
6131 | } |
|
6132 | } |
|
6133 | ||
6134 | $this->adapter->exec( 'PRAGMA foreign_keys = 1 ' ); |
|
6135 | } |
|
6136 | } |
|
6137 | } |
|
6138 |