DROP TABLE IF EXISTS tng_albumplinks;
CREATE TABLE `tng_albumplinks` (
  `alinkID` int NOT NULL AUTO_INCREMENT,
  `gedcom` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `linktype` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
  `entityID` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `eventID` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
  `albumID` int NOT NULL,
  `ordernum` float NOT NULL,
  PRIMARY KEY (`alinkID`),
  UNIQUE KEY `alinkID` (`gedcom`,`entityID`,`albumID`),
  KEY `entityID` (`gedcom`,`entityID`,`ordernum`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;
