--- mqtt/etc/mqtt_pub.sql 2011/11/24 13:02:01 1.1.2.2 +++ mqtt/etc/mqtt_pub.sql 2011/11/24 13:57:11 1.1.2.4 @@ -3,7 +3,7 @@ BEGIN TRANSACTION; CREATE TABLE Online ( Username varchar(64) not null, RemoteHost varchar(64) not null, -RepotePort smallint not null, +RemotePort smallint unsigned not null, Stamp timestamp); CREATE TABLE Topics ( id integer not null primary key, @@ -16,6 +16,7 @@ PubHost varchar(64) not null, Stamp timestamp); CREATE INDEX RemoteHost on Online (RemoteHost); CREATE INDEX Username on Online (Username); +CREATE UNIQUE INDEX User on Online (Username, RemoteHost); CREATE INDEX PubDate on Topics (PubDate); CREATE INDEX PubHost on Topics (PubHost); CREATE INDEX PubUser on Topics (PubUser);