hasTable(...))`, so changing it would only ever * reach fresh installs. * * The `default` is what migrates the existing rows — every workflow written * before this release was evaluated against the due date, and the column * default gives exactly that without a backfill step. */ class Version1001Date20260825120000 extends SimpleMigrationStep { public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper { /** @var ISchemaWrapper $schema */ $schema = $schemaClosure(); if (!$schema->hasTable('wfda_workflows')) { return null; } $table = $schema->getTable('wfda_workflows'); if ($table->hasColumn('date_field')) { return null; } $table->addColumn('date_field', Types::STRING, [ 'notnull' => true, 'length' => 16, 'default' => Workflow::DATE_FIELD_DUE, ]); return $schema; } }