Permalink
Browse files

Ouch!! Missing PostgreSQL files for chat module

  • Loading branch information...
1 parent 8d282c7 commit 15ccfb296b65663ea4e14fd74978abae9516efec moodler committed Aug 31, 2003
Showing with 69 additions and 0 deletions.
  1. +14 −0 mod/chat/db/postgres7.php
  2. +55 −0 mod/chat/db/postgres7.sql
@@ -0,0 +1,14 @@
+<?PHP // $Id$
+
+function chat_upgrade($oldversion) {
+// This function does anything necessary to upgrade
+// older versions to match current functionality
+
+ global $CFG;
+
+ return true;
+}
+
+
+?>
+
@@ -0,0 +1,55 @@
+#
+# Table structure for table `chat`
+#
+
+CREATE TABLE prefix_chat (
+ id SERIAL,
+ course INTEGER NOT NULL default '0',
+ name varchar(255) NOT NULL default '',
+ intro text NOT NULL,
+ keepdays INTEGER NOT NULL default '0',
+ studentlogs INTEGER NOT NULL default '0',
+ chattime INTEGER NOT NULL default '0',
+ schedule INTEGER NOT NULL default '0',
+ timemodified INTEGER NOT NULL default '0',
+ PRIMARY KEY (id)
+);
+# --------------------------------------------------------
+
+#
+# Table structure for table `chat_messages`
+#
+
+CREATE TABLE prefix_chat_messages (
+ id SERIAL,
+ chatid integer NOT NULL default '0',
+ userid integer NOT NULL default '0',
+ system integer NOT NULL default '0',
+ message text NOT NULL,
+ timestamp integer NOT NULL default '0',
+ PRIMARY KEY (id)
+);
+# --------------------------------------------------------
+
+#
+# Table structure for table `chat_users`
+#
+
+CREATE TABLE prefix_chat_users (
+ id SERIAL,
+ chatid integer NOT NULL default '0',
+ userid integer NOT NULL default '0',
+ version varchar(16) NOT NULL default '',
+ ip varchar(15) NOT NULL default '',
+ firstping integer NOT NULL default '0',
+ lastping integer NOT NULL default '0',
+ lastmessageping integer NOT NULL default '0',
+ sid varchar(32) NOT NULL default '',
+ PRIMARY KEY (id)
+);
+
+
+INSERT INTO prefix_log_display VALUES ('chat', 'view', 'chat', 'name');
+INSERT INTO prefix_log_display VALUES ('chat', 'add', 'chat', 'name');
+INSERT INTO prefix_log_display VALUES ('chat', 'update', 'chat', 'name');
+INSERT INTO prefix_log_display VALUES ('chat', 'report', 'chat', 'name');

0 comments on commit 15ccfb2

Please sign in to comment.