abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('ALTER TABLE users.users ADD public BOOLEAN DEFAULT FALSE NOT NULL'); $this->addSql('ALTER TABLE users.users ADD whitelist_only BOOLEAN DEFAULT FALSE NOT NULL'); $this->addSql('CREATE INDEX idx_user_public ON users.users (public)'); $this->addSql('CREATE INDEX idx_user_removed ON users.users (is_removed)'); } public function down(Schema $schema): void { $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.'); $this->addSql('DROP INDEX users.idx_user_public'); $this->addSql('DROP INDEX users.idx_user_removed'); $this->addSql('ALTER TABLE users.users DROP public'); $this->addSql('ALTER TABLE users.users DROP whitelist_only'); } }