migration: add missing column checks (fix #845)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/807/merge
Varun Patil 2023-10-06 15:14:16 -07:00
parent 14941a6c43
commit 12bd8823e7
2 changed files with 13 additions and 9 deletions

View File

@ -56,10 +56,12 @@ class Version505000Date20230821044807 extends SimpleMigrationStep
$schema = $schemaClosure();
$table = $schema->getTable('memories');
if (!$table->hasColumn('epoch')) {
$table->addColumn('epoch', Types::BIGINT, [
'notnull' => true,
'default' => 0,
]);
}
return $schema;
}

View File

@ -44,11 +44,13 @@ class Version505004Date20231004200012 extends SimpleMigrationStep
$schema = $schemaClosure();
$table = $schema->getTable('memories');
if (!$table->hasColumn('buid')) {
$table->addColumn('buid', Types::STRING, [
'notnull' => false,
'length' => 32,
'default' => '',
]);
}
return $schema;
}