Changes to the MySQL schema to be more like jfbethlehem's SQLite schema.

An update2.sql is provided that might update the schema without data loss,
however if you value your data, it's a good idea to create a backup first.



git-svn-id: https://kippo.googlecode.com/svn/trunk@127 951d7100-d841-11de-b865-b3884708a8e2
This commit is contained in:
desaster
2010-06-17 17:11:22 +00:00
parent bd23dd9fd4
commit 7cb8e06949
3 changed files with 86 additions and 43 deletions

View File

@@ -8,7 +8,6 @@ CREATE TABLE IF NOT EXISTS `auth` (
PRIMARY KEY (`id`)
) ;
CREATE TABLE IF NOT EXISTS `input` (
`id` int(11) NOT NULL auto_increment,
`session` int(11) NOT NULL,
@@ -20,14 +19,25 @@ CREATE TABLE IF NOT EXISTS `input` (
KEY `session` (`session`,`timestamp`,`realm`)
) ;
CREATE TABLE IF NOT EXISTS `sensors` (
`id` int(11) NOT NULL auto_increment,
`ip` varchar(15) NOT NULL,
PRIMARY KEY (`id`)
) ;
CREATE TABLE IF NOT EXISTS `session` (
CREATE TABLE IF NOT EXISTS `sessions` (
`id` int(11) NOT NULL auto_increment,
`starttime` datetime NOT NULL,
`endtime` datetime default NULL,
`sensor` varchar(50) NOT NULL,
`sensor` int(4) NOT NULL,
`ip` varchar(15) NOT NULL default '',
`ttylog` mediumblob,
PRIMARY KEY (`id`),
KEY `starttime` (`starttime`,`sensor`)
) ;
CREATE TABLE IF NOT EXISTS `ttylog` (
`id` int(11) NOT NULL auto_increment,
`session` int(11) NOT NULL,
`ttylog` mediumblob NOT NULL,
PRIMARY KEY (`id`)
) ;