version 1.1.2.7, 2011/11/28 16:59:28
|
version 1.1.2.8, 2011/12/08 17:02:25
|
Line 1
|
Line 1
|
PRAGMA foreign_keys=ON; |
PRAGMA foreign_keys=ON; |
BEGIN TRANSACTION; |
BEGIN TRANSACTION; |
CREATE TABLE IF NOT EXISTS Online ( |
CREATE TABLE IF NOT EXISTS Online ( |
Username varchar(64) not null, | Username varchar(12) not null, |
| ConnID varchar(23) not null, |
RemoteHost varchar(64) not null, |
RemoteHost varchar(64) not null, |
RemotePort smallint unsigned not null, |
RemotePort smallint unsigned not null, |
|
WillFlag tinyint not null, |
|
WillTopic text, |
|
WillMsg text, |
|
WillQoS tinyint, |
|
WillRetain tinyint, |
Stamp timestamp); |
Stamp timestamp); |
CREATE TABLE IF NOT EXISTS Topics ( |
CREATE TABLE IF NOT EXISTS Topics ( |
id integer not null primary key, |
id integer not null primary key, |
|
MsgID smallint unsigned not null, |
Retain char not null, |
Retain char not null, |
Topic varchar(255) not null, |
Topic varchar(255) not null, |
Value text, |
Value text, |
Line 16 PubHost varchar(64) not null,
|
Line 23 PubHost varchar(64) not null,
|
Stamp timestamp); |
Stamp timestamp); |
CREATE INDEX IF NOT EXISTS RemoteHost on Online (RemoteHost); |
CREATE INDEX IF NOT EXISTS RemoteHost on Online (RemoteHost); |
CREATE INDEX IF NOT EXISTS Username on Online (Username); |
CREATE INDEX IF NOT EXISTS Username on Online (Username); |
CREATE UNIQUE INDEX IF NOT EXISTS User on Online (Username, RemoteHost); | CREATE INDEX IF NOT EXISTS ConnID on Online (ConnID); |
| CREATE UNIQUE INDEX IF NOT EXISTS User on Online (Username, ConnID, RemoteHost); |
CREATE INDEX IF NOT EXISTS PubDate on Topics (PubDate); |
CREATE INDEX IF NOT EXISTS PubDate on Topics (PubDate); |
CREATE INDEX IF NOT EXISTS PubHost on Topics (PubHost); |
CREATE INDEX IF NOT EXISTS PubHost on Topics (PubHost); |
CREATE INDEX IF NOT EXISTS PubUser on Topics (PubUser); |
CREATE INDEX IF NOT EXISTS PubUser on Topics (PubUser); |
|
CREATE INDEX IF NOT EXISTS MsgID on Topics (MsgID); |
CREATE INDEX IF NOT EXISTS Topic on Topics (Topic); |
CREATE INDEX IF NOT EXISTS Topic on Topics (Topic); |
CREATE TRIGGER IF NOT EXISTS Online_update_t AFTER UPDATE ON Online |
CREATE TRIGGER IF NOT EXISTS Online_update_t AFTER UPDATE ON Online |
BEGIN |
BEGIN |