DROP TABLE IF EXISTS tng_events;
CREATE TABLE `tng_events` (
  `eventID` int NOT NULL AUTO_INCREMENT,
  `gedcom` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `persfamID` varchar(22) COLLATE utf8mb4_unicode_ci NOT NULL,
  `eventtypeID` int NOT NULL,
  `eventdate` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `eventdatetr` date NOT NULL,
  `eventplace` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `age` varchar(12) COLLATE utf8mb4_unicode_ci NOT NULL,
  `agency` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cause` varchar(90) COLLATE utf8mb4_unicode_ci NOT NULL,
  `addressID` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `parenttag` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `info` text COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`eventID`),
  KEY `persfamID` (`gedcom`,`persfamID`),
  KEY `eventplace` (`gedcom`,`eventplace`(20))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
