You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
db-schema/db_scripts/init/0005_create_ngcp.up

18 lines
454 B

USE mysql;
DROP DATABASE IF EXISTS ngcp;
CREATE DATABASE IF NOT EXISTS ngcp CHARACTER SET 'utf8';
USE ngcp;
-- create schema tables
CREATE TABLE `db_schema` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`revision` int(11) unsigned NOT NULL,
`node` varchar(64) NOT NULL,
`applied_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `rev_idx` (`revision`,`node`)
) ENGINE=InnoDB;