myt/structure.sql

22 lines
623 B
SQL

CREATE TABLE `version` (
`code` varchar(255) NOT NULL,
`number` char(11) NOT NULL,
`gitCommit` varchar(255) NOT NULL,
`updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;
ALTER TABLE `version`
ADD PRIMARY KEY (`code`);
CREATE TABLE `versionUser` (
`code` varchar(255) NOT NULL,
`user` varchar(255) NOT NULL,
`number` char(11) NOT NULL,
`gitCommit` varchar(255) NOT NULL,
`updated` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB;
ALTER TABLE `versionUser`
ADD PRIMARY KEY (`code`,`user`);