Update 20251125120000_create_warehouse_project_journal.php

This commit is contained in:
Luca Haid
2025-12-02 14:54:21 +00:00
parent 2b64b80bd1
commit 697774a6b8

View File

@@ -9,10 +9,10 @@ final class CreateWarehouseProjectJournal extends AbstractMigration
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table('WarehouseProjectJournal');
$table->addColumn('projectId', 'integer')
$table->addColumn('projectId', 'integer', ['signed' => false]) // Fixed: Matches unsigned ID
->addColumn('text', 'text', ['null' => true])
->addColumn('data', 'json', ['null' => true, 'comment' => 'Stores changes/diffs'])
->addColumn('createBy', 'integer')
->addColumn('createBy', 'integer', ['signed' => false]) // Fixed: Best practice for User IDs
->addColumn('create', 'integer')
->addForeignKey('projectId', 'WarehouseProject', 'id', ['delete' => 'CASCADE', 'update' => 'CASCADE'])
->create();