This commit is contained in:
Dennis Eichhorn 2017-10-03 21:39:34 +02:00
parent a70302d761
commit 3f979ac445
3 changed files with 1 additions and 37 deletions

View File

@ -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,

View File

@ -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
*

View File

@ -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'],
];