
CREATE TABLE `payments` (
  `ID` int(11) UNSIGNED NOT NULL,
  `AdminID` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `ModuleID` int(11) UNSIGNED NOT NULL,
  `ModuleName` varchar(16) NOT NULL,
  `PostDate` datetime NOT NULL,
  `Amount` float(10,2) NOT NULL,
  `Currency` char(3) NOT NULL DEFAULT 'EUR',
  `PaymentType` varchar(16) NOT NULL,
  `Comment` varchar(255) NOT NULL,
  `Info` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `payments`
  ADD PRIMARY KEY (`ID`),
  ADD KEY `ModuleNameID` (`ModuleName`,`ModuleID`) USING BTREE,
  ADD KEY `AdminID` (`AdminID`);


ALTER TABLE `payments`
  MODIFY `ID` int(11) NOT NULL AUTO_INCREMENT;