abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE queries ADD hash VARCHAR(255) NOT NULL'); $this->addSql('CREATE INDEX hash_idx ON queries (hash)'); } /** * @param Schema $schema */ public function down(Schema $schema) { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('DROP INDEX hash_idx ON queries'); $this->addSql('ALTER TABLE queries DROP hash'); } }