Merge branch 'spidev' into 'master'
Kalenderupdate See merge request fronk/thetool!1804
This commit is contained in:
@@ -74,6 +74,7 @@ final class CalendarAddFields extends AbstractMigration
|
|||||||
if ($table->hasColumn('calendar_name')) {
|
if ($table->hasColumn('calendar_name')) {
|
||||||
$table->removeColumn('calendar_name');
|
$table->removeColumn('calendar_name');
|
||||||
}
|
}
|
||||||
|
$table->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->getEnvironment() == "addressdb") {
|
if($this->getEnvironment() == "addressdb") {
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
use Phinx\Migration\AbstractMigration;
|
||||||
|
|
||||||
|
final class CalendarAddFieldsCalendarAdmin extends AbstractMigration
|
||||||
|
{
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
if($this->getEnvironment() == "thetool") {
|
||||||
|
//calendar_admin
|
||||||
|
$table = $this->table('Calendar');
|
||||||
|
if (!$table->hasColumn('calendar_admin')) {
|
||||||
|
$table
|
||||||
|
->addColumn('calendar_admin', 'boolean', [
|
||||||
|
'default' => 0,
|
||||||
|
'after' => 'active',
|
||||||
|
'comment' => 'User has calendar admin rights',
|
||||||
|
])
|
||||||
|
->update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->getEnvironment() == "addressdb") {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
if($this->getEnvironment() == "thetool") {
|
||||||
|
$table = $this->table('Calendar');
|
||||||
|
if ($table->hasColumn('calendar_admin')) {
|
||||||
|
$table->removeColumn('calendar_admin');
|
||||||
|
}
|
||||||
|
$table->update();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->getEnvironment() == "addressdb") {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user