
#---------------------------------------------------------
#
# Table structure for table 'chat_channel'
#

CREATE TABLE chat_channel (
	con int(11) DEFAULT '0' NOT NULL auto_increment,
   name varchar(10) NOT NULL,
   title char(50),
   PRIMARY KEY(con)
);


#---------------------------------------------------------
#
# Insert Main and lounge into channel table
#

INSERT INTO chat_channel (name, title) values ("Main", "WooHoo");
INSERT INTO chat_channel (name, title) values ("lounge", "Lazy_Dayz");

# --------------------------------------------------------
#
# Table structure for table 'chat_messages'
#

CREATE TABLE chat_messages (
  con		int(11) DEFAULT '0' NOT NULL auto_increment,
  channel char(20) NOT NULL,
  loginid varchar(25) NOT NULL,
  message text,
  messagetype int(5),
  timesent int(11),
  PRIMARY KEY(con)
);

# --------------------------------------------------------
#
# Table structure for table 'chat_currentin'
#

CREATE TABLE chat_currentin (
	con int(11) DEFAULT '0' NOT NULL AUTO_INCREMENT,
   loginid varchar(25) NOT NULL,
   channel char(20),
   lastmessage int(11),
   PRIMARY KEY(con)
);

# --------------------------------------------------------
#
# Table structure for table 'chat_privatechat'
#

CREATE TABLE chat_privatechat (
	con int(11) DEFAULT '0' NOT NULL auto_increment,
	user1 varchar(25) NOT NULL,
	user2 varchar(25) NOT NULL,
	sentby varchar(25),
	message text,
	messagetype int(5),
	timesent int(11),
	closed int(1),
	PRIMARY KEY(con)
);

