DROP TABLE IF EXISTS tng_sources;
CREATE TABLE `tng_sources` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `gedcom` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sourceID` varchar(22) COLLATE utf8mb4_unicode_ci NOT NULL,
  `callnum` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `title` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `author` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `publisher` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `other` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `shorttitle` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `comments` text COLLATE utf8mb4_unicode_ci,
  `actualtext` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `repoID` varchar(22) COLLATE utf8mb4_unicode_ci NOT NULL,
  `changedate` datetime NOT NULL,
  `changedby` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `sourceID` (`gedcom`,`sourceID`),
  KEY `changedate` (`changedate`),
  FULLTEXT KEY `sourcetext` (`actualtext`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
