* Vorlagen können nun erstellt und editiert werden. * neue Migration für CalendarTemplates
37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
|
|
use Phinx\Migration\AbstractMigration;
|
|
|
|
final class CalendarTemplate extends AbstractMigration
|
|
{
|
|
public function up(): void
|
|
{
|
|
if ($this->getEnvironment() == "thetool") {
|
|
$table = $this->table("CalendarTemplate", ["signed" => true]);
|
|
|
|
$table->addColumn("event_type", "integer", ["null" => false, "default" => "0"]);
|
|
$table->addColumn("name", "text", ["null" => false]);
|
|
$table->addColumn("is_reminder", "integer", ["null" => false, "default" => "0"]);
|
|
$table->addColumn("text", "text", ["null" => true]);
|
|
$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("CalendarTemplate")->drop()->save();
|
|
}
|
|
if ($this->getEnvironment() == "addressdb") {
|
|
}
|
|
}
|
|
}
|
|
?>
|