diff --git a/migration/data/Version20241023154223.php b/migration/data/Version20241023154223.php new file mode 100644 index 0000000..03ad820 --- /dev/null +++ b/migration/data/Version20241023154223.php @@ -0,0 +1,54 @@ +connection->getDatabasePlatform()->registerDoctrineTypeMapping('enum', 'string'); + + $this->d3AddLongdescColumnToOxmanufacturers($schema); + } + + public function down(Schema $schema) : void + { + // this down() migration is auto-generated, please modify it to your needs + + } + + /** + * @param Schema $schema + * @return void + * @throws \Doctrine\DBAL\Schema\SchemaException + */ + public function d3AddLongdescColumnToOxmanufacturers(Schema $schema){ + $table = !$schema->hasTable('oxmanufacturers') ? + $schema->createTable('oxmanufacturers') : + $schema->getTable('oxmanufacturers'); + + // Beschreibung + if (!$table->hasColumn('D3DESCRIPTION')) { + $table->addColumn('D3DESCRIPTION', (new StringType())->getName()) + ->setLength(255) + ->setNotnull(true); + } + } +}