![]() |
|
[split] error: 1064 - You have an error in your SQL syntax; - Printable Version +- Sentora Support Forums (https://senforums.mach-hosting.com) +-- Forum: Sentora Forum Archives (https://senforums.mach-hosting.com/forumdisplay.php?fid=5) +--- Forum: Sentora Public Support Forums v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=32) +---- Forum: General Support Forum v1.0.x (https://senforums.mach-hosting.com/forumdisplay.php?fid=36) +---- Thread: [split] error: 1064 - You have an error in your SQL syntax; (/showthread.php?tid=4193) |
[split] error: 1064 - You have an error in your SQL syntax; - kaz050457 - 11-10-2017 Code: CREATE TABLE `vacation_notification` (`on_vacation` varchar(255) NOT NULL, notified` varchar(255) CHARACTER SET latin1 NOT NULL, `notified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`on_vacation`,`notified`), CONSTRAINT `vacation_notification_pkey` FOREIGN KEY (`on_vacation`) REFERENCES `vacation` (`email`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Postfix Admin - Virtual Vacation Notifications';error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '` varchar(255) CHARACTER SET latin1 NOT NULL, `notified_at` timestamp NOT NULL D' at line 1 RE: [split] error: 1064 - You have an error in your SQL syntax; - TGates - 11-10-2017 (11-10-2017, 01:26 AM)kaz050457 Wrote: First, start your own post with your specific issue instead of 'hijacking' another post. This is a direct dump of my table, it should work for you: Code: CREATE TABLE `vacation_notification` (
`on_vacation` varchar(255) NOT NULL,
`notified` varchar(255) CHARACTER SET latin1 NOT NULL,
`notified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Postfix Admin - Virtual Vacation Notifications';
ALTER TABLE `vacation_notification`
ADD PRIMARY KEY (`on_vacation`,`notified`);
ALTER TABLE `vacation_notification`
ADD CONSTRAINT `vacation_notification_pkey` FOREIGN KEY (`on_vacation`) REFERENCES `vacation` (`email`) ON DELETE CASCADE; |