From 3f979ac4453158aa68ad09a7116eefc892b54968 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Tue, 3 Oct 2017 21:39:34 +0200 Subject: [PATCH] Fix #7 --- Admin/Installer.php | 9 +-------- Models/Calendar.php | 28 ---------------------------- Models/CalendarMapper.php | 1 - 3 files changed, 1 insertion(+), 37 deletions(-) diff --git a/Admin/Installer.php b/Admin/Installer.php index 2b77922..b497af4 100644 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -46,18 +46,11 @@ class Installer extends InstallerAbstract `calendar_name` varchar(255) NOT NULL, `calendar_password` varchar(255) DEFAULT NULL, `calendar_description` varchar(255) NOT NULL, - `calendar_created_by` int(11) NOT NULL, `calendar_created_at` datetime NOT NULL, - PRIMARY KEY (`calendar_id`), - KEY `calendar_created_by` (`calendar_created_by`) + PRIMARY KEY (`calendar_id`) )ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;' )->execute(); - $dbPool->get()->con->prepare( - 'ALTER TABLE `' . $dbPool->get()->prefix . 'calendar` - ADD CONSTRAINT `' . $dbPool->get()->prefix . 'calendar_ibfk_1` FOREIGN KEY (`calendar_created_by`) REFERENCES `' . $dbPool->get()->prefix . 'account` (`account_id`);' - )->execute(); - $dbPool->get()->con->prepare( 'CREATE TABLE if NOT EXISTS `' . $dbPool->get()->prefix . 'calendar_permission` ( `calendar_permission_id` int(11) NOT NULL AUTO_INCREMENT, diff --git a/Models/Calendar.php b/Models/Calendar.php index d3a6fe7..04a9a69 100644 --- a/Models/Calendar.php +++ b/Models/Calendar.php @@ -60,14 +60,6 @@ class Calendar */ private $createdAt = null; - /** - * Created by. - * - * @var int - * @since 1.0.0 - */ - private $createdBy = 0; - /** * Current date of the calendar. * @@ -251,26 +243,6 @@ class Calendar $this->createdAt = $createdAt; } - /** - * @return int - * - * @since 1.0.0 - */ - public function getCreatedBy() : int - { - return $this->createdBy; - } - - /** - * @param int $createdBy Creator - * - * @since 1.0.0 - */ - public function setCreatedBy(int $createdBy) - { - $this->createdBy = $createdBy; - } - /** * Get current date * diff --git a/Models/CalendarMapper.php b/Models/CalendarMapper.php index bfdadb7..ab87c00 100644 --- a/Models/CalendarMapper.php +++ b/Models/CalendarMapper.php @@ -50,7 +50,6 @@ class CalendarMapper extends DataMapperAbstract 'calendar_name' => ['name' => 'calendar_name', 'type' => 'string', 'internal' => 'name'], 'calendar_password' => ['name' => 'calendar_password', 'type' => 'string', 'internal' => 'password'], 'calendar_description' => ['name' => 'calendar_description', 'type' => 'string', 'internal' => 'description'], - 'calendar_created_by' => ['name' => 'calendar_created_by', 'type' => 'int', 'internal' => 'createdBy'], 'calendar_created_at' => ['name' => 'calendar_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'], ];