Skip to content

Commit

Permalink
Added format field for messages
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Dec 28, 2004
1 parent 0eacb23 commit e53c030
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/db/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,11 @@ function main_upgrade($oldversion=0) {
modify_database('', "INSERT INTO prefix_log_display VALUES ('message', 'read', 'user', 'CONCAT(firstname,\" \",lastname)'); ");
}

if ($oldversion < 2004122801) {
table_column('message', '', 'format', 'integer', '4', 'unsigned', '0', 'not null', 'message');
table_column('message_read', '', 'format', 'integer', '4', 'unsigned', '0', 'not null', 'message');
}

return $result;

}
Expand Down
2 changes: 2 additions & 0 deletions lib/db/mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ CREATE TABLE `prefix_message` (
`useridfrom` int(10) NOT NULL default '0',
`useridto` int(10) NOT NULL default '0',
`message` text NOT NULL,
`format` int(4) unsigned NOT NULL default '0',
`timecreated` int(10) NOT NULL default '0',
`messagetype` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`),
Expand All @@ -326,6 +327,7 @@ CREATE TABLE `prefix_message_read` (
`useridfrom` int(10) NOT NULL default '0',
`useridto` int(10) NOT NULL default '0',
`message` text NOT NULL,
`format` int(4) unsigned NOT NULL default '0',
`timecreated` int(10) NOT NULL default '0',
`timeread` int(10) NOT NULL default '0',
`messagetype` varchar(50) NOT NULL default '',
Expand Down
5 changes: 5 additions & 0 deletions lib/db/postgres7.php
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,11 @@ function main_upgrade($oldversion=0) {
INSERT INTO prefix_log_display VALUES ('message', 'read', 'user', 'firstname||\' \'||lastname');
");
}

if ($oldversion < 2004122801) {
table_column('message', '', 'format', 'integer', '4', 'unsigned', '0', 'not null', 'message');
table_column('message_read', '', 'format', 'integer', '4', 'unsigned', '0', 'not null', 'message');
}


return $result;
Expand Down
2 changes: 2 additions & 0 deletions lib/db/postgres7.sql
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ CREATE TABLE prefix_message (
useridfrom integer NOT NULL default '0',
useridto integer NOT NULL default '0',
message text,
format integer NOT NULL default '0',
timecreated integer NOT NULL default '0',
messagetype varchar(50) NOT NULL default ''
);
Expand All @@ -199,6 +200,7 @@ CREATE TABLE prefix_message_read (
useridfrom integer NOT NULL default '0',
useridto integer NOT NULL default '0',
message text,
format integer NOT NULL default '0',
timecreated integer NOT NULL default '0',
timeread integer NOT NULL default '0',
messagetype varchar(50) NOT NULL default '',
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)

$version = 2004122800; // YYYYMMDD = date of first major branch release 1.4
$version = 2004122801; // YYYYMMDD = date of first major branch release 1.4
// XY = increments within a single day

$release = '1.5 UNSTABLE DEVELOPMENT'; // Human-friendly version name
Expand Down

0 comments on commit e53c030

Please sign in to comment.