migration: add missing column checks (fix #845)
Signed-off-by: Varun Patil <radialapps@gmail.com>pull/807/merge
parent
14941a6c43
commit
12bd8823e7
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue