Login   Register  
PHP Classes
elePHPant
Icontem

File: SiteMessage.sql

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of John Wetsell  >  Site Message  >  SiteMessage.sql  >  Download  
File: SiteMessage.sql
Role: Auxiliary data
Content type: text/plain
Description: SQL create statements for the two tables that these classes use.
Class: Site Message
Exchange messages between site users using MySQL
Author: By
Last change:
Date: 4 years ago
Size: 1,093 bytes
 

Contents

Class file image Download
#
#	$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)
        );