File: mysql.sql

package info (click to toggle)
moodle 1.6.3-2%2Betch3
  • links: PTS
  • area: main
  • in suites: etch
  • size: 37,172 kB
  • ctags: 51,688
  • sloc: php: 231,916; sql: 5,631; xml: 2,688; sh: 1,185; perl: 638; makefile: 48; pascal: 36
file content (70 lines) | stat: -rw-r--r-- 2,689 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# Table structure for table `chat`
#

CREATE TABLE `prefix_chat` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `course` int(10) unsigned NOT NULL default '0',
  `name` varchar(255) NOT NULL default '',
  `intro` text NOT NULL default '',
  `keepdays` int(11) NOT NULL default '0',
  `studentlogs` int(4) NOT NULL default '0',
  `chattime` int(10) unsigned NOT NULL default '0',
  `schedule` int(4) NOT NULL default '0',
  `timemodified` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `course` (`course`)
) TYPE=MyISAM COMMENT='Each of these is a chat room';
# --------------------------------------------------------

#
# Table structure for table `chat_messages`
#

CREATE TABLE `prefix_chat_messages` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `chatid` int(10) NOT NULL default '0',
  `userid` int(10) NOT NULL default '0',
  `groupid` int(10) NOT NULL default '0',
  `system` int(1) unsigned NOT NULL default '0',
  `message` text NOT NULL default '',
  `timestamp` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `timemodifiedchat` (`timestamp`,`chatid`),
  KEY `chatid` (`chatid`),
  KEY `userid` (`userid`),
  KEY `groupid` (`groupid`)
) TYPE=MyISAM COMMENT='Stores all the actual chat messages';
# --------------------------------------------------------

#
# Table structure for table `chat_users`
#

CREATE TABLE `prefix_chat_users` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `chatid` int(11) NOT NULL default '0',
  `userid` int(11) NOT NULL default '0',
  `groupid` int(11) NOT NULL default '0',
  `version` varchar(16) NOT NULL default '',
  `ip` varchar(15) NOT NULL default '',
  `firstping` int(10) unsigned NOT NULL default '0',
  `lastping` int(10) unsigned NOT NULL default '0',
  `lastmessageping` int(10) unsigned NOT NULL default '0',
  `sid` varchar(32) NOT NULL default '',
  `course` int(10) NOT NULL default '0',
  `lang` varchar(10) NOT NULL default '', 
  PRIMARY KEY  (`id`),
  KEY `userid` (`userid`),
  KEY `lastping` (`lastping`),
  KEY `chatid` (`chatid`),
  KEY `groupid` (`groupid`)
) TYPE=MyISAM COMMENT='Keeps track of which users are in which chat rooms';


INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('chat', 'view', 'chat', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('chat', 'add', 'chat', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('chat', 'update', 'chat', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('chat', 'report', 'chat', 'name');
INSERT INTO prefix_log_display (module, action, mtable, field) VALUES ('chat', 'talk', 'chat', 'name');