Pagekit\Database\Utility::migrate PHP 메소드

migrate() 공개 메소드

Migrates the database.
public migrate ( ) : Doctrine\DBAL\Schema\Schema
리턴 Doctrine\DBAL\Schema\Schema
    public function migrate()
    {
        $diff = Comparator::compareSchemas($this->manager->createSchema(), $this->schema);
        foreach ($diff->toSaveSql($this->connection->getDatabasePlatform()) as $query) {
            $this->connection->executeQuery($query);
        }
    }