From 66cb723b3110791a1d0f4728f21be12fb650a314 Mon Sep 17 00:00:00 2001 From: Marcel Diegelmann Date: Tue, 17 Jun 2025 11:47:01 +0200 Subject: [PATCH] Postgre Statements integrieren --- migrations/Version20250325073036.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/migrations/Version20250325073036.php b/migrations/Version20250325073036.php index 1d5bdfd2..dae163dc 100644 --- a/migrations/Version20250325073036.php +++ b/migrations/Version20250325073036.php @@ -291,11 +291,21 @@ final class Version20250325073036 extends AbstractMultiPlatformMigration public function postgreSQLUp(Schema $schema): void { - //Not needed + $this->addSql(<<<'SQL' + ALTER TABLE categories ADD part_ipn_prefix VARCHAR(255) DEFAULT '' NOT NULL + SQL); + $this->addSql(<<<'SQL' + DROP INDEX uniq_6940a7fe3d721c14 + SQL); } public function postgreSQLDown(Schema $schema): void { - //Not needed + $this->addSql(<<<'SQL' + ALTER TABLE "categories" DROP part_ipn_prefix + SQL); + $this->addSql(<<<'SQL' + CREATE UNIQUE INDEX uniq_6940a7fe3d721c14 ON "parts" (ipn) + SQL); } }