# phones 0.5.1
# 19.10.2004
CREATE TABLE pphone (
id int(10) unsigned NOT NULL auto_increment,
number varchar(6) NOT NULL DEFAULT '',
person varchar(25),
strid int(10),
house varchar(8),
flat smallint(4) unsigned,
PRIMARY KEY (id),
INDEX number (number),
INDEX person (person),
INDEX address (strid,house)
);
CREATE TABLE ophone (
id int(10) unsigned NOT NULL auto_increment,
number varchar(6) NOT NULL DEFAULT '',
offid int(10),
strid int(10),
house varchar(8),
flat smallint(4) unsigned,
note varchar(50),
PRIMARY KEY (id),
INDEX number (number),
INDEX office (offid)
);
CREATE TABLE street (
strid int(10) unsigned NOT NULL auto_increment,
street varchar(50),
PRIMARY KEY (strid)
);
CREATE TABLE office (
offid int(10) unsigned NOT NULL auto_increment,
office varchar(50),
PRIMARY KEY (offid)
);
CREATE TABLE auth (
authid smallint(5) unsigned NOT NULL auto_increment,
login varchar(16) binary NOT NULL DEFAULT '',
pswd varchar(32) binary NOT NULL DEFAULT '',
logdate datetime NOT NULL DEFAULT '2004-01-01 00:00:00',
logaddr varchar(20) NOT NULL DEFAULT '',
PRIMARY KEY (authid)
);
CREATE TABLE message (
id int(10) unsigned NOT NULL auto_increment,
message text,
date datetime,
host varchar(20),
PRIMARY KEY (id)
);
CREATE TABLE quote (
id int(10) unsigned NOT NULL auto_increment,
quote varchar(255),
PRIMARY KEY (id)
);
INSERT INTO auth VALUES('1','admin',MD5('admin'),'2004-10-19 00:05:01','127.0.0.1');