Added birthday to Address

This commit is contained in:
Frank Schubert
2024-07-18 15:05:24 +02:00
parent d54673289f
commit 724e2eccee
6 changed files with 61 additions and 4 deletions
@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class AddressAddBirthdate extends AbstractMigration
{
public function up(): void
{
if($this->getEnvironment() == "thetool") {
$table = $this->table("Address");
$table->addColumn("birthdate", "date", ["null" => true, "default" => null, "after" => "uid"]);
$table->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if($this->getEnvironment() == "thetool") {
$this->table("Address")->removeColumn("birthdate")->update();
}
if($this->getEnvironment() == "addressdb") {
}
}
}