* Nur Migration
This commit is contained in:
Daniel Spitzer
2024-11-03 18:14:43 +01:00
parent 1f24baf4e0
commit d8d02d6f44

View File

@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
use Phinx\Migration\AbstractMigration;
final class Calendar extends AbstractMigration
{
public function up(): void
{
if ($this->getEnvironment() == "thetool") {
$table = $this->table("Calendar", ["signed" => true]);
$table->addColumn("user_id", "integer", ["null" => false]);
$table->addColumn("go_calendar_id", "integer", ["null" => false]);
$table->addColumn("microsoft_id", "text", ["null" => false]);
$table->addColumn("rights", "text", ["null" => true]);
$table->addColumn("colors", "text", ["null" => true]);
$table->addColumn("groups", "text", ["null" => true]);
$table->addColumn("subscription_id", "text", ["null" => true]);
$table->addColumn("expirationDateTime", "integer", ["null" => true]);
$table->addColumn("active", "integer", ["null" => false, "default" => "1"]);
$table->addColumn("create_by", "integer", ["null" => false]);
$table->addColumn("edit_by", "integer", ["null" => false]);
$table->addColumn("create", "integer", ["null" => false]);
$table->addColumn("edit", "integer", ["null" => false]);
$table->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
public function down(): void
{
if ($this->getEnvironment() == "thetool") {
$this->table("Calendar")->drop()->save();
}
if ($this->getEnvironment() == "addressdb") {
}
}
}