Fix broken migration and deprecation

This commit is contained in:
Tim 2025-04-24 17:33:24 +02:00
parent 3c4c470547
commit c1b896a63a
2 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ final class Version20231220204107 extends AbstractMigration
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
// this up() migration is auto-generated, please modify it to your needs // this up() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE snip ADD active_version_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\', DROP active_commit'); $this->addSql('ALTER TABLE snip ADD active_version_id BINARY(16) DEFAULT NULL COMMENT \'(DC2Type:ulid)\'');
$this->addSql('ALTER TABLE snip ADD CONSTRAINT FK_FEBD97966A1E45F3 FOREIGN KEY (active_version_id) REFERENCES snip_content (id)'); $this->addSql('ALTER TABLE snip ADD CONSTRAINT FK_FEBD97966A1E45F3 FOREIGN KEY (active_version_id) REFERENCES snip_content (id)');
$this->addSql('CREATE INDEX IDX_FEBD97966A1E45F3 ON snip (active_version_id)'); $this->addSql('CREATE INDEX IDX_FEBD97966A1E45F3 ON snip (active_version_id)');
} }
@ -30,6 +30,6 @@ final class Version20231220204107 extends AbstractMigration
// this down() migration is auto-generated, please modify it to your needs // this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE snip DROP FOREIGN KEY FK_FEBD97966A1E45F3'); $this->addSql('ALTER TABLE snip DROP FOREIGN KEY FK_FEBD97966A1E45F3');
$this->addSql('DROP INDEX IDX_FEBD97966A1E45F3 ON snip'); $this->addSql('DROP INDEX IDX_FEBD97966A1E45F3 ON snip');
$this->addSql('ALTER TABLE snip ADD active_commit VARCHAR(255) DEFAULT NULL, DROP active_version_id'); $this->addSql('ALTER TABLE snip DROP active_version_id');
} }
} }

View File

@ -33,7 +33,7 @@ class SnipLoader implements LoaderInterface
return true; return true;
} }
public function exists(string $name) public function exists(string $name): bool
{ {
try { try {
$this->getFromKey($name); $this->getFromKey($name);