]> git.mjollnir.org Git - moodle.git/commitdiff
Moving some stuff to forum/db where they belong... (sorry!)
authordefacer <defacer>
Tue, 1 Jun 2004 07:39:27 +0000 (07:39 +0000)
committerdefacer <defacer>
Tue, 1 Jun 2004 07:39:27 +0000 (07:39 +0000)
lib/db/mysql.php
lib/db/postgres7.php
mod/forum/db/mysql.php
mod/forum/db/mysql.sql
mod/forum/db/postgres7.php
mod/forum/db/postgres7.sql
mod/forum/version.php

index 5990efad0317e439859c337516f9b43b4ee5d3a4..935c8b538d6c562b4e08d4346a5924c20893dac0 100644 (file)
@@ -773,15 +773,6 @@ function main_upgrade($oldversion=0) {
     if ($oldversion < 2004060100) {
         set_config('digestmailtime', 0);
         table_column('user', "", 'maildigest', 'tinyint', '1', '', '0', 'not null', 'mailformat');
-        modify_database('', "CREATE TABLE `prefix_forum_queue` (
-                                `id` int(11) unsigned NOT NULL auto_increment,
-                                `userid` int(11) unsigned default 0 NOT NULL,
-                                `discussionid` int(11) unsigned default 0 NOT NULL,
-                                `postid` int(11) unsigned default 0 NOT NULL,
-                                PRIMARY KEY  (`id`),
-                                KEY `user` (userid),
-                                KEY `post` (postid),
-                              ) TYPE=MyISAM COMMENT='For keeping track of posts that will be mailed in digest form';");
     }
 
     return $result;
index 2e799132a09736a7735977b6034597b6dc30e928..9c570862b89ba0533403ecfb4fdf58d57f52fca6 100644 (file)
@@ -515,12 +515,6 @@ function main_upgrade($oldversion=0) {
     if ($oldversion < 2004060100) {
         set_config('digestmailtime', 0);
         table_column('user', "", 'maildigest', 'smallint', '1', '', '0', 'not null', 'mailformat');
-        modify_database('', "CREATE TABLE `prefix_forum_queue` (
-                                id SERIAL PRIMARY KEY,
-                                userid integer default 0 NOT NULL,
-                                discussionid integer default 0 NOT NULL,
-                                postid integer default 0 NOT NULL
-                              );");
     }
 
     return $result;
index e7f4ea88806c0df9aca101e540708cabaf3efe0d..54789f36b06b0cfaee6bc2add2cc740bbb531803 100644 (file)
@@ -114,7 +114,19 @@ function forum_upgrade($oldversion) {
       table_column("forum","","rssarticles","tinyint","2", "unsigned", "0", "", "rsstype");
       set_config("forum_enablerssfeeds",0);
   }
-  
+
+  if ($oldversion < 2004060100) {
+      modify_database('', "CREATE TABLE `prefix_forum_queue` (
+                                `id` int(11) unsigned NOT NULL auto_increment,
+                                `userid` int(11) unsigned default 0 NOT NULL,
+                                `discussionid` int(11) unsigned default 0 NOT NULL,
+                                `postid` int(11) unsigned default 0 NOT NULL,
+                                PRIMARY KEY  (`id`),
+                                KEY `user` (userid),
+                                KEY `post` (postid),
+                              ) TYPE=MyISAM COMMENT='For keeping track of posts that will be mailed in digest form';");
+  }
+
   return true;
 
 }
index b3a25585fd4479ce6efa448ae6e7770c4f867fd2..249066b7243b874e64f7bcf7cd72161439067cf9 100644 (file)
@@ -64,6 +64,21 @@ CREATE TABLE prefix_forum_posts (
 ) COMMENT='All posts are stored in this table';
 # --------------------------------------------------------
 
+#
+# Table structure for table `forum_queue`
+#
+
+CREATE TABLE prefix_forum_queue (
+  id int(10) unsigned NOT NULL auto_increment, 
+  userid int(10) unsigned default 0 NOT NULL,
+  discussionid int(10) unsigned default 0 NOT NULL,
+  postid int(10) unsigned default 0 NOT NULL,
+  PRIMARY KEY  (id),
+  KEY user (userid),
+  KEY post (postid),
+) COMMENT='For keeping track of posts that will be mailed in digest form';
+# --------------------------------------------------------
+
 #
 # Table structure for table `forum_ratings`
 #
index 1c5babc1d7798c33ba7771a725fa77658234f8c0..ca844f7cf07e8c3255228d8342ae0c87355bc0fb 100644 (file)
@@ -53,6 +53,15 @@ function forum_upgrade($oldversion) {
       set_config("forum_enablerssfeeds",0);
   }
 
+  if ($oldversion < 2004060100) {
+      modify_database('', "CREATE TABLE `prefix_forum_queue` (
+                           id SERIAL PRIMARY KEY,
+                           userid integer default 0 NOT NULL,
+                           discussionid integer default 0 NOT NULL,
+                           postid integer default 0 NOT NULL
+                           );");
+  }
+
   return true;
 
 }
index d7c716f5c056846aa73dfdba89037382e6bfb143..3087d222f13037c7310531628e3351bdc70c2226 100644 (file)
@@ -60,6 +60,20 @@ CREATE TABLE prefix_forum_posts (
 );
 # --------------------------------------------------------
 
+#
+# Table structure for table `forum_queue`
+#
+
+CREATE TABLE prefix_forum_queue (
+  id SERIAL PRIMARY KEY,
+  userid integer default 0 NOT NULL,
+  discussionid integer default 0 NOT NULL,
+  postid integer default 0 NOT NULL
+);
+
+
+# --------------------------------------------------------
+
 #
 # Table structure for table `forum_ratings`
 #
index deeca2dd08d0d9e059e56883f926de29bc2460f4..7fb937adbfac215036c289b7ac899160835adfb0 100644 (file)
@@ -5,8 +5,8 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2004050300;
-$module->requires = 2004050300;  // Requires this Moodle version
+$module->version  = 2004060100;
+$module->requires = 2004060100;  // Requires this Moodle version
 $module->cron     = 60;
 
 ?>