abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('DROP EXTENSION IF NOT EXISTS postgis;'); } public function getDescription(): string { return 'Enable the postgis extension in public schema'; } public function up(Schema $schema): void { $this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('CREATE EXTENSION IF NOT EXISTS postgis;'); } }