From b2733004c962c94dbd2865cee7f3f971e6daa34e Mon Sep 17 00:00:00 2001 From: Daniel Spitzer Date: Sun, 5 Oct 2025 20:51:15 +0200 Subject: [PATCH] Kalenderupdate * Komplette Verwaltung von Kalender Rechte von internen und externen Mitarbeiteren --- .../20251005183109_calendar_add_fields.php | 1 + ...454_calendar_add_fields_calendar_admin.php | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 db/migrations/20251005184454_calendar_add_fields_calendar_admin.php diff --git a/db/migrations/20251005183109_calendar_add_fields.php b/db/migrations/20251005183109_calendar_add_fields.php index d5375fcd2..63c9c7bc0 100644 --- a/db/migrations/20251005183109_calendar_add_fields.php +++ b/db/migrations/20251005183109_calendar_add_fields.php @@ -74,6 +74,7 @@ final class CalendarAddFields extends AbstractMigration if ($table->hasColumn('calendar_name')) { $table->removeColumn('calendar_name'); } + $table->update(); } if($this->getEnvironment() == "addressdb") { diff --git a/db/migrations/20251005184454_calendar_add_fields_calendar_admin.php b/db/migrations/20251005184454_calendar_add_fields_calendar_admin.php new file mode 100644 index 000000000..ccb1f368a --- /dev/null +++ b/db/migrations/20251005184454_calendar_add_fields_calendar_admin.php @@ -0,0 +1,43 @@ +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") { + + } + } +}