CREATE TABLE IF NOT EXISTS generator(
	gn VARCHAR(50),
	s INT(8),
	i INT(8),
	PRIMARY KEY(gn)
) Engine=InnoDB;

CREATE TABLE IF NOT EXISTS kernel_schema_codebase(
	ID VARCHAR(13) NOT NULL,
	layer VARCHAR(50) NOT NULL,
	package VARCHAR(150) NOT NULL,
	fullname VARCHAR(150) NOT NULL,
	ispackage TINYINT(1) NOT NULL DEFAULT 0,
	tcode MEDIUMBLOB NULL,
	ccode MEDIUMBLOB NULL,
	PRIMARY KEY(layer, package, fullname),
	KEY(fullname)
) Engine=InnoDB;

CREATE TABLE IF NOT EXISTS kernel_schema_package(
	ID VARCHAR(13) NOT NULL,
	package VARCHAR(150) NOT NULL,
	rawdata MEDIUMBLOB NULL,
	PRIMARY KEY(id)
) Engine=InnoDB;

INSERT INTO generator VALUES('default', 1, 1);
