-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmahana.sql
More file actions
31 lines (27 loc) · 929 Bytes
/
Copy pathmahana.sql
File metadata and controls
31 lines (27 loc) · 929 Bytes
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
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE `msg_messages` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`thread_id` int(11) NOT NULL,
`body` text NOT NULL,
`priority` int(2) NOT NULL DEFAULT '0',
`sender_id` int(11) NOT NULL,
`cdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `msg_participants` (
`user_id` int(11) NOT NULL,
`thread_id` int(11) NOT NULL,
`cdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`user_id`,`thread_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `msg_status` (
`message_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`status` int(2) NOT NULL,
PRIMARY KEY (`message_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `msg_threads` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`subject` text,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;