Fixed migration

This commit is contained in:
Frank Schubert
2026-02-02 11:27:40 +01:00
parent e021a51ef0
commit d79b7bdb1d

View File

@@ -7,13 +7,14 @@ final class WarehouseCategorySetPrefixes extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table('WarehouseCategory');
if (!$table->hasColumn('articleNumberPrefix')) {
$table->addColumn('articleNumberPrefix', 'string', ['limit' => 4, 'null' => true, 'after' => 'description'])
->update();
}
if ($this->getEnvironment() == "thetool") {
$prefixes = [
1 => '1901', // Dienstleistungen
3 => '9980', // EStmk Shop