CREATE TABLE "inbox" (
	"number" character varying(20) NOT NULL,
	"smsdate" timestamp NOT NULL,
	"insertdate" timestamp DEFAULT 'now' NOT NULL,
	"text" character varying(160),
	"processed" bool DEFAULT 'false',
	PRIMARY KEY ("number", "smsdate")
);
CREATE TABLE "outbox" (
	"id" serial,
	"number" character varying(20) NOT NULL,
	"insertdate" timestamp DEFAULT 'now' NOT NULL,
	"text" text NOT NULL,
	"hexencode" bool DEFAULT 'false' NOT NULL,
	"type" character varying(20) DEFAULT 'text' NOT NULL,
	"fromfile" bool DEFAULT 'false' NOT NULL,
	"netcode" character varying(10) DEFAULT NULL NULL,
	"udhpresent" bool DEFAULT 'false' NOT NULL,
	"longuseudh" bool DEFAULT 'true' NOT NULL,
	"eightbit" bool DEFAULT 'false' NOT NULL,
	"smsc" character varying(20) DEFAULT NULL NULL,
	"processed" bool DEFAULT 'false'
);
CREATE INDEX outbox_processed ON "outbox" (processed);
