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');
|
||||||
$table->addColumn('epoch', Types::BIGINT, [
|
if (!$table->hasColumn('epoch')) {
|
||||||
'notnull' => true,
|
$table->addColumn('epoch', Types::BIGINT, [
|
||||||
'default' => 0,
|
'notnull' => true,
|
||||||
]);
|
'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');
|
||||||
$table->addColumn('buid', Types::STRING, [
|
if (!$table->hasColumn('buid')) {
|
||||||
'notnull' => false,
|
$table->addColumn('buid', Types::STRING, [
|
||||||
'length' => 32,
|
'notnull' => false,
|
||||||
'default' => '',
|
'length' => 32,
|
||||||
]);
|
'default' => '',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
return $schema;
|
return $schema;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue