summaryrefslogtreecommitdiff
path: root/db/update.sql
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2017-12-29 17:30:54 +0100
committermsquare <msquare@notrademark.de>2017-12-29 17:30:54 +0100
commitbe3652b44aa279d7a8ae153d8038959e71eb7ecc (patch)
treec14b5aa69e26bfee9dac4068202e9b019732905d /db/update.sql
parent86a38a3372557bd72db309e7b24b4a4a95544397 (diff)
fix work log logs
Diffstat (limited to 'db/update.sql')
-rw-r--r--db/update.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/update.sql b/db/update.sql
index 351cf8b4..f012e319 100644
--- a/db/update.sql
+++ b/db/update.sql
@@ -51,7 +51,7 @@ ALTER TABLE `AngelTypes` ADD `show_on_dashboard` BOOLEAN NOT NULL AFTER `contact
UPDATE `AngelTypes` SET `show_on_dashboard` = TRUE;
-- Work Log
-CREATE TABLE `engelsystem`.`UserWorkLog` ( `id` INT NOT NULL AUTO_INCREMENT , `user_id` INT NOT NULL , `work_hours` DECIMAL NOT NULL , `comment` VARCHAR(200) NOT NULL , `created_user_id` INT NOT NULL , `created_timestamp` INT NOT NULL , PRIMARY KEY (`id`), INDEX (`user_id`), INDEX (`created_user_id`)) ENGINE = InnoDB;
+CREATE TABLE `UserWorkLog` ( `id` INT NOT NULL AUTO_INCREMENT , `user_id` INT NOT NULL , `work_hours` DECIMAL NOT NULL , `comment` VARCHAR(200) NOT NULL , `created_user_id` INT NOT NULL , `created_timestamp` INT NOT NULL , PRIMARY KEY (`id`), INDEX (`user_id`), INDEX (`created_user_id`)) ENGINE = InnoDB;
ALTER TABLE `UserWorkLog` ADD FOREIGN KEY (`created_user_id`) REFERENCES `User`(`UID`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `UserWorkLog` ADD FOREIGN KEY (`user_id`) REFERENCES `User`(`UID`) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE `UserWorkLog` ADD INDEX(`created_timestamp`);
INSERT INTO `Privileges` (`id`, `name`, `desc`) VALUES (NULL, 'admin_user_worklog', 'Manage user work log entries.');