1
0
mirror of https://github.com/docker/docs.git synced 2026-11-06 12:54:24 +03:00
Files
docs/notarymysql/initial-notaryserver.sql
HuKeping 91d66f5e7a [PATHC 3/4] Only create the needed tables
Make database notaryserver and notarysigner only create the tables they
need.

The signer only needs the private_keys table, and the server only needs
the timestamp_keys and tuf_files tables.

Signed-off-by: Hu Keping <hukeping@huawei.com>
2016-01-29 10:10:25 +08:00

21 lines
598 B
SQL

DROP TABLE IF EXISTS `tuf_files`;
CREATE TABLE `tuf_files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`gun` varchar(255) NOT NULL,
`role` varchar(255) NOT NULL,
`version` int(11) NOT NULL,
`sha256` char(64) DEFAULT NULL,
`data` longblob NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `gun` (`gun`,`role`,`version`),
INDEX `sha256` (`sha256`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `timestamp_keys`;
CREATE TABLE `timestamp_keys` (
`gun` varchar(255) NOT NULL,
`cipher` varchar(50) NOT NULL,
`public` blob NOT NULL,
PRIMARY KEY (`gun`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;