home *** CD-ROM | disk | FTP | other *** search
- -- This file contains the database table creation and insertion code for
- -- the message bases and the email server.
-
- --/////////////////////////////////////////////////////////////////////
- --// General Message Stuff
- --/////////////////////////////////////////////////////////////////////
-
-
- CREATE TABLE Messages(
- MsgID integer NOT NULL PRIMARY KEY DEFAULT AUTOINCREMENT,
- MsgSubject long varchar NOT NULL DEFAULT '',
- MsgFrom long varchar NOT NULL DEFAULT '',
- MsgTo long varchar NOT NULL DEFAULT '',
- MsgBody long binary NOT NULL DEFAULT '',
- MsgPrivate integer NOT NULL DEFAULT 0,
- PostDate date,
- PostTime long varchar,
- ReadDate date,
- ReadTime long varchar,
- ContentType long varchar NOT NULL DEFAULT '',
- ContentTransferEncoding long varchar NOT NULL DEFAULT '',
- ReceiveDate long varchar,
- ReceiveTime long varchar,
- LastDeliveryDateTime datetime,
- LastWarning datetime,
- MsgRaw long binary NOT NULL DEFAULT '',
- );
-
- CREATE TABLE Msg_User(
- MsgID integer NOT NULL DEFAULT 0,
- UsrID integer NOT NULL DEFAULT 0
- );
-
- CREATE TABLE MsgB_Msg(
- MbID integer NOT NULL DEFAULT 0,
- MID integer NOT NULL DEFAULT 0
- );
-
- CREATE TABLE LMRS(
- UsrID integer NOT NULL DEFAULT 0,
- MbID integer NOT NULL DEFAULT 0,
- LMR integer NOT NULL DEFAULT 0
- );
-
- CREATE INDEX MSG_MessageID on "DBA".Messages (MsgID);
- CREATE INDEX MSG_MsgB_MsgBID on "DBA".MsgB_Msg (MbID);
- CREATE INDEX MSG_MsgB_MsgID on "DBA".MsgB_Msg (MID);
- CREATE INDEX MSG_MessageTO on "DBA".Msg_User (UsrId);
-
- --/////////////////////////////////////////////////////////////////////
- --// MetaWorlds type messagebase stuff
- --/////////////////////////////////////////////////////////////////////
-
- Insert Into SubSysTP (Id, Descript, QueryScript, TypeParam, Button) VALUES (1, 'Message Base','msgbase','msgbase?DOCUMENT=msglstpr.sht&id=','msgbs5.gif');
-
- Insert Into SubSysIn (id,typeid,instparam,descript) VALUES (3, 1, '3', 'Main Board: Messages');
- Insert Into sub_prof (InstanceID, ProfileId) VALUES (3, 0); // new user
- Insert Into sub_prof (InstanceID, ProfileId) VALUES (3, 1); // sysop
- Insert Into sub_prof (InstanceID, ProfileId) VALUES (3, 2); // guest
- Insert Into Area_Sub (AreaId, InstanceId) VALUES (0, 3);
-
- Insert Into SubSysIn (id,typeid,instparam,descript) VALUES (5, 1, '5', 'New User: Messages');
- Insert Into sub_prof (InstanceID, ProfileId) VALUES (5, 0); // new user
- Insert Into sub_prof (InstanceID, ProfileId) VALUES (5, 1); // sysop
- Insert Into Area_Sub (AreaId, InstanceId) VALUES (1, 5);
-
-
- --/////////////////////////////////////////////////////////////////////
- --// PCBoard type messagebase stuff
- --/////////////////////////////////////////////////////////////////////
-
- Insert Into SubSysTP (Id, Descript, QueryScript, TypeParam, Button) VALUES (5, 'PCBoard Message Base','','msgbase?DOCUMENT=msglstpr.sht&id=','msgbs5.gif');
-
- Insert Into SubSysIn (id,typeid,instparam,descript) VALUES (101, 5, '101&conf=0', 'PC Board Messages');
- Insert Into sub_prof (InstanceID, ProfileId) VALUES (101, 1); -- sysop
- Insert Into Area_Sub (AreaId, InstanceId) VALUES (0, 101);
-
-
- --/////////////////////////////////////////////////////////////////////
- --// Email Server stuff
- --/////////////////////////////////////////////////////////////////////
-
-
- create table mail_prot
- (
- id integer NOT NULL DEFAULT 0,
- name long varchar NOT NULL DEFAULT 'Undefined'
- );
-
- CREATE TABLE mail_prot_instance
- (
- id integer NOT NULL DEFAULT AUTOINCREMENT,
- prot_id integer NOT NULL DEFAULT 0,
- address long varchar NOT NULL DEFAULT '',
- msgb_id integer NOT NULL DEFAULT 0
- );
-
- create table mpi_msg
- (
- pi_id integer NOT NULL DEFAULT 0,
- msg_id integer NOT NULL DEFAULT 0,
- );
-
- insert into mail_prot(id, name) values (0, 'SMTP');
-
- Insert into mail_prot_instance(id, prot_id, address, msgb_id) values(0, 0, '<default>', -5);
-
- -- this is the personal mail message base
- Insert Into SubSysIn (id,typeid,instparam,descript) VALUES (-5, 1, '-5', 'Email');
- Insert Into sub_prof (InstanceID, ProfileId) VALUES (-5, 0); -- new user
- Insert Into sub_prof (InstanceID, ProfileId) VALUES (-5, 1); -- sysop
- Insert Into sub_prof (InstanceID, ProfileId) VALUES (-5, 2); -- guest
- Insert Into Area_Sub (AreaId, InstanceId) VALUES (0, -5);
-
-
-