diff --git a/Migrations/Postgresql/Version20251128070842.php b/Migrations/Postgresql/Version20251128070842.php new file mode 100644 index 0000000..1399ee8 --- /dev/null +++ b/Migrations/Postgresql/Version20251128070842.php @@ -0,0 +1,42 @@ +abortIf( + !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\PostgreSQL100Platform, + "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\PostgreSQL100Platform'." + ); + + $this->addSql('CREATE TABLE swisscom_commandmigration_domain_model_migrationstatus (persistence_object_identifier VARCHAR(40) NOT NULL, version VARCHAR(255) NOT NULL, PRIMARY KEY(persistence_object_identifier))'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->abortIf( + !$this->connection->getDatabasePlatform() instanceof \Doctrine\DBAL\Platforms\PostgreSQL100Platform, + "Migration can only be executed safely on '\Doctrine\DBAL\Platforms\PostgreSQL100Platform'." + ); + + $this->addSql('CREATE SCHEMA public'); + $this->addSql('DROP TABLE swisscom_commandmigration_domain_model_migrationstatus'); + } +}