CREATE TABLE `ActionLinkGroupTemplate` (
    `Id` int(11) NOT NULL,
    `IsDeleted` int(11),
    `DeveloperName` varchar(255),
    `Language` varchar(255),
    `MasterLabel` varchar(255),
    `NamespacePrefix` varchar(255),
    `CreatedDate` varchar(255),
    `CreatedById` int(11), -- foreign key: User.Id,
    `LastModifiedDate` varchar(255),
    `LastModifiedById` int(11), -- foreign key: User.Id,
    `SystemModstamp` varchar(255),
    `ExecutionsAllowed` varchar(255),
    `HoursUntilExpiration` int(11),
    `Category` varchar(255),
    `IsPublished` int(11),
    PRIMARY KEY (`Id`) ,
    CONSTRAINT `FK_ActionLinkGroupTemplate_CreatedById` FOREIGN KEY (`CreatedById`) REFERENCES `User` (`Id`),
    CONSTRAINT `FK_ActionLinkGroupTemplate_LastModifiedById` FOREIGN KEY (`LastModifiedById`) REFERENCES `User` (`Id`)
);
CREATE TABLE `ActionLinkTemplate` (
    `Id` int(11) NOT NULL,
    `IsDeleted` int(11),
    `CreatedDate` varchar(255),
    `CreatedById` int(11), -- foreign key: User.Id,
    `LastModifiedDate` varchar(255),
    `LastModifiedById` int(11), -- foreign key: User.Id,
    `SystemModstamp` varchar(255),
    `ActionLinkGroupTemplateId` int(11), -- foreign key: ActionLinkGroupTemplate.Id,
    `LabelKey` varchar(255),
    `Method` varchar(255),
    `LinkType` varchar(255),
    `Position` int(11),
    `IsConfirmationRequired` int(11),
    `IsGroupDefault` int(11),
    `UserVisibility` varchar(255),
    `UserAlias` varchar(255),
    `Label` varchar(255),
    `ActionUrl` text,
    `RequestBody` text,
    `Headers` text,
    PRIMARY KEY (`Id`) ,
    CONSTRAINT `FK_ActionLinkTemplate_CreatedById` FOREIGN KEY (`CreatedById`) REFERENCES `User` (`Id`),
    CONSTRAINT `FK_ActionLinkTemplate_LastModifiedById` FOREIGN KEY (`LastModifiedById`) REFERENCES `User` (`Id`),
    CONSTRAINT `FK_ActionLinkTemplate_ActionLinkGroupTemplateId` FOREIGN KEY (`ActionLinkGroupTemplateId`) REFERENCES `ActionLinkGroupTemplate` (`Id`)
);
