Skip to content

Commit

Permalink
Moving some stuff to forum/db where they belong... (sorry!)
Browse files Browse the repository at this point in the history
  • Loading branch information
defacer committed Jun 1, 2004
1 parent 8d24137 commit 5bb8c19
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 18 deletions.
9 changes: 0 additions & 9 deletions lib/db/mysql.php
Expand Up @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions lib/db/postgres7.php
Expand Up @@ -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;
Expand Down
14 changes: 13 additions & 1 deletion mod/forum/db/mysql.php
Expand Up @@ -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;

}
Expand Down
15 changes: 15 additions & 0 deletions mod/forum/db/mysql.sql
Expand Up @@ -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`
#
Expand Down
9 changes: 9 additions & 0 deletions mod/forum/db/postgres7.php
Expand Up @@ -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;

}
Expand Down
14 changes: 14 additions & 0 deletions mod/forum/db/postgres7.sql
Expand Up @@ -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`
#
Expand Down
4 changes: 2 additions & 2 deletions mod/forum/version.php
Expand Up @@ -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;

?>

0 comments on commit 5bb8c19

Please sign in to comment.