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();
|
$schema = $schemaClosure();
|
||||||
|
|
||||||
$table = $schema->getTable('memories');
|
$table = $schema->getTable('memories');
|
||||||
|
if (!$table->hasColumn('epoch')) {
|
||||||
$table->addColumn('epoch', Types::BIGINT, [
|
$table->addColumn('epoch', Types::BIGINT, [
|
||||||
'notnull' => true,
|
'notnull' => true,
|
||||||
'default' => 0,
|
'default' => 0,
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
return $schema;
|
return $schema;
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,11 +44,13 @@ class Version505004Date20231004200012 extends SimpleMigrationStep
|
||||||
$schema = $schemaClosure();
|
$schema = $schemaClosure();
|
||||||
|
|
||||||
$table = $schema->getTable('memories');
|
$table = $schema->getTable('memories');
|
||||||
|
if (!$table->hasColumn('buid')) {
|
||||||
$table->addColumn('buid', Types::STRING, [
|
$table->addColumn('buid', Types::STRING, [
|
||||||
'notnull' => false,
|
'notnull' => false,
|
||||||
'length' => 32,
|
'length' => 32,
|
||||||
'default' => '',
|
'default' => '',
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
return $schema;
|
return $schema;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue