diff --git a/misc/create_schema.sql b/misc/create_schema.sql index adbe508..5f9764c 100644 --- a/misc/create_schema.sql +++ b/misc/create_schema.sql @@ -39,6 +39,25 @@ CREATE TABLE `berth` ( ) ENGINE=InnoDB AUTO_INCREMENT=195 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='Berth of ship for a ship call'; /*!40101 SET character_set_client = @saved_cs_client */; +CREATE TABLE `history` ( + `id` int unsigned NOT NULL AUTO_INCREMENT, + `participant_id` int unsigned NOT NULL, + `user_id` int unsigned DEFAULT NULL, + `shipcall_id` int unsigned NOT NULL, + `timestamp` datetime NOT NULL COMMENT 'Time of saving', + `eta` datetime DEFAULT NULL COMMENT 'Current ETA / ETD value (depends if shipcall or times were saved)', + `type` int NOT NULL COMMENT 'shipcall or times', + `operation` int NOT NULL COMMENT 'insert, update or delete', + PRIMARY KEY (`id`), + KEY `FK_HISTORY_PARTICIPANT_idx` (`participant_id`), + KEY `FK_HISTORY_SHIPCALL_idx` (`shipcall_id`), + KEY `FK_HISTORY_USER` (`user_id`), + CONSTRAINT `FK_HISTORY_PARTICIPANT` FOREIGN KEY (`participant_id`) REFERENCES `participant` (`id`), + CONSTRAINT `FK_HISTORY_SHIPCALL` FOREIGN KEY (`shipcall_id`) REFERENCES `shipcall` (`id`), + CONSTRAINT `FK_HISTORY_USER` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=29292 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='This table stores a history of changes made to shipcalls so that everyone can see who changed what and when'; + + -- -- Table structure for table `notification` -- diff --git a/src/RoleEditor/App.config b/src/RoleEditor/App.config index 51c1ce1..2ba1186 100644 --- a/src/RoleEditor/App.config +++ b/src/RoleEditor/App.config @@ -8,7 +8,7 @@ - Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling_devel;Port=33306 + Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling_test;Port=33307 diff --git a/src/RoleEditor/MainWindow.xaml b/src/RoleEditor/MainWindow.xaml index 5dde421..76d287a 100644 --- a/src/RoleEditor/MainWindow.xaml +++ b/src/RoleEditor/MainWindow.xaml @@ -59,7 +59,7 @@