Files
docker-docs/migrations/server/mysql/0001_initial.up.sql
David Lawrence 44fe5bcaa4 initial database migration state
Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
2015-12-02 16:09:41 -08:00

25 lines
825 B
SQL

CREATE TABLE `timestamp_keys` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`gun` varchar(255) NOT NULL,
`cipher` varchar(50) NOT NULL,
`public` blob NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `gun` (`gun`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `tuf_files` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`gun` varchar(255) NOT NULL,
`role` varchar(255) NOT NULL,
`version` int(11) NOT NULL,
`data` longblob NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `gun` (`gun`,`role`,`version`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;