Fixed migration

This commit is contained in:
Frank Schubert
2026-02-02 11:27:40 +01:00
parent e021a51ef0
commit d79b7bdb1d
@@ -7,13 +7,14 @@ final class WarehouseCategorySetPrefixes extends AbstractMigration
{ {
public function up(): void public function up(): void
{ {
if ($this->getEnvironment() == "thetool") {
$table = $this->table('WarehouseCategory'); $table = $this->table('WarehouseCategory');
if (!$table->hasColumn('articleNumberPrefix')) { if (!$table->hasColumn('articleNumberPrefix')) {
$table->addColumn('articleNumberPrefix', 'string', ['limit' => 4, 'null' => true, 'after' => 'description']) $table->addColumn('articleNumberPrefix', 'string', ['limit' => 4, 'null' => true, 'after' => 'description'])
->update(); ->update();
} }
if ($this->getEnvironment() == "thetool") {
$prefixes = [ $prefixes = [
1 => '1901', // Dienstleistungen 1 => '1901', // Dienstleistungen
3 => '9980', // EStmk Shop 3 => '9980', // EStmk Shop