src/Migration/Migrator.php
public function emptyDb()
    {
        if (($rows = $this->db->fetchRows('SHOW TABLES', [], true))) {
            $this->db->exec('SET foreign_key_checks = 0');
            foreach ($rows as $row) {
                $this->db->exec('DROP TABLE `' . $row[0] . '`');
            }
            $this->db->exec('SET foreign_key_checks = 1');
        }
    }
public function emptyDb()
    {
        if (($rows = $this->db->fetchRows('SHOW TABLES', [], true))) {
            $this->db->exec('SET foreign_key_checks = 0');
            foreach ($rows as $row) {
                $this->db->exec('DROP TABLE `' . $row[0] . '`');
            }
            $this->db->exec('SET foreign_key_checks = 1');
        }
    }
public function emptyDb ( ) { if ( ( $ rows = $ this -> db -> fetchRows ( 'SHOW TABLES' , [ ] , true ) ) ) { $ this -> db -> exec ( 'SET foreign_key_checks = 0' ) ; foreach ( $ rows as $ row ) { $ this -> db -> exec ( 'DROP TABLE `' . $ row [ 0 ] . '`' ) ; } $ this -> db -> exec ( 'SET foreign_key_checks = 1' ) ; } }
Empty database.
Empty database .