abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', '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($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('CREATE EXTENSION IF NOT EXISTS postgis;'); } }