public function import(array $tables)
    {
        foreach ($tables as $table => $data) {

            if (!$this->query($this->getSqlCreateTable($table, $data))) {
                throw new RuntimeException("Failed to import database table $table");
            }

            $alter = $this->getSqlAlterTable($table, $data);

            if (!empty($alter) && !$this->query($alter)) {
                throw new RuntimeException("Failed to alter table $table");
            }
        }
    }
public function import(array $tables)
    {
        foreach ($tables as $table => $data) {

            if (!$this->query($this->getSqlCreateTable($table, $data))) {
                throw new RuntimeException("Failed to import database table $table");
            }

            $alter = $this->getSqlAlterTable($table, $data);

            if (!empty($alter) && !$this->query($alter)) {
                throw new RuntimeException("Failed to alter table $table");
            }
        }
    }
public function import ( array $ tables ) { foreach ( $ tables as $ table => $ data ) { if ( ! $ this -> query ( $ this -> getSqlCreateTable ( $ table , $ data ) ) ) { throw new RuntimeException ( "Failed to import database table $table" ) ; } $ alter = $ this -> getSqlAlterTable ( $ table , $ data ) ; if ( ! empty ( $ alter ) && ! $ this -> query ( $ alter ) ) { throw new RuntimeException ( "Failed to alter table $table" ) ; } } }
Creates tables using an array of scheme data
@param array $tables
@throws RuntimeException
Creates tables using an array of scheme data