<tr><td>id</td><td>int</td><td>Incrementing message id starting at 1.</td></tr>
<tr><td>id</td><td>int, primary key</td><td>Incrementing message id starting at 1.</td></tr>
<tr><td>time</td><td>timestamp</td><td>Time when message has been stored in the database.</td></tr>
<tr><td>time</td><td>timestamp</td><td>Time when message has been stored in the database.</td></tr>
<tr><td>user</td><td>varchar(50)</td><td>The sender's user name (pseudonym).</td></tr>
<tr><td>user</td><td>varchar(50), references \ref usertable "user (name)"</td><td>The sender's user name (pseudonym).</td></tr>
<tr><td>msg</td><td>longtext</td><td>The encryped and armored message text.</td></tr>
<tr><td>msg</td><td>longtext</td><td>The encryped and armored message text.</td></tr>
</table>
</table>
*/
*/
@ -23,7 +23,7 @@
require_once("opendb.php");
require_once("opendb.php");
try {
try {
$db->query('create table if not exists message (id int primary key not null auto_increment, time timestamp default current_timestamp, user varchar(50) not null, msg longtext not null);');
$db->query('create table if not exists message (id int primary key not null auto_increment, time timestamp default current_timestamp, user varchar(50) not null, msg longtext not null, foreign key (user) references user(name) on delete cascade on update cascade) character set utf8 engine=innodb;');
$db->query('set global max_allowed_packet=1000000000');
$db->query('set global max_allowed_packet=1000000000');
$db->query('set global net_buffer_length=1000000');
$db->query('set global net_buffer_length=1000000');