Fixed pop network migration

This commit is contained in:
Frank Schubert
2024-12-29 12:42:33 +01:00
parent 65c5c9f94a
commit 12f0d8c036

View File

@@ -16,6 +16,8 @@ final class PopNetwork extends AbstractMigration
$popnetwork->addColumn("create", "integer", ["null" => false]);
$popnetwork->addColumn("edit", "integer", ["null" => false]);
$popnetwork->save();
$this->table("Pop")->changeColumn("network_id", "integer", ["null" => true, "default" => null])->save();
}
if($this->getEnvironment() == "addressdb") {
@@ -26,6 +28,7 @@ final class PopNetwork extends AbstractMigration
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Pop")->changeColumn("network_id", "integer", ["null" => false])->save();
$this->table("PopNetwork")->drop()->save();
}