#
# $RCSfile: libSiteMessage.sql,v $
# @author $Author: Cornelius Bolten $
# @version $Revision: 1.1 $
#
# @description:
# sql-setup-script for libSiteMessage SQLITE
#
CREATE TABLE siteMessage (
sm_id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
sm_thread_id VARCHAR(25) NOT NULL,
sm_sender_id INTEGER NOT NULL,
sm_receiver_id INTEGER NOT NULL,
sm_subject_data TEXT NOT NULL,
sm_message_data TEXT NOT NULL,
sm_message_date DATETIME NOT NULL,
sm_message_read VARCHAR(15) NULL,
sm_folder_id INTEGER NOT NULL DEFAULT 0
);
CREATE TABLE siteMessageFolders (
sm_folder_id INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT,
sm_user_id INTEGER NOT NULL,
sm_folder_name VARCHAR(50) NOT NULL,
sm_parent_id INTEGER(10) NULL,
sm_folder_date DATETIME NOT NULL,
UNIQUE (sm_user_id,sm_folder_name)
); |