diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-07-31 08:14:25 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-07-31 08:14:25 +0000 |
commit | ec593987916aaf6993ab9ab715722fc6a12c284d (patch) | |
tree | a59c6905f6f81685172e78b4aa7e7558ef406514 | |
parent | bb19e0bb45ef948138e2d86867375bde8d4aeb70 (diff) | |
download | brdo-ec593987916aaf6993ab9ab715722fc6a12c284d.tar.gz brdo-ec593987916aaf6993ab9ab715722fc6a12c284d.tar.bz2 |
- feed table should have not null defined for refresh and timestamp.
-rw-r--r-- | database/database.mysql | 4 | ||||
-rw-r--r-- | update.php | 12 |
2 files changed, 11 insertions, 5 deletions
diff --git a/database/database.mysql b/database/database.mysql index 68b35619a..707429754 100644 --- a/database/database.mysql +++ b/database/database.mysql @@ -157,8 +157,8 @@ CREATE TABLE feed ( fid int(10) NOT NULL auto_increment, title varchar(255) NOT NULL default '', url varchar(255) NOT NULL default '', - refresh int(11) default NULL, - timestamp int(11) default NULL, + refresh int(11) NOT NULL default'0', + timestamp int(11) NOT NULL default'0', attributes varchar(255) NOT NULL default '', link varchar(255) NOT NULL default '', description text NOT NULL, diff --git a/update.php b/update.php index c0109d68e..f98e84287 100644 --- a/update.php +++ b/update.php @@ -45,7 +45,8 @@ $mysql_updates = array( "2002-05-02" => "update_30", "2002-05-15" => "update_31", "2002-06-22" => "update_32", - "2002-07-07" => "update_33" + "2002-07-07" => "update_33", + "2002-07-31" => "update_34" ); // Update functions @@ -479,18 +480,23 @@ function update_31() { } function update_32() { - update_sql(" ALTER TABLE users ADD index (sid(4));"); + update_sql("ALTER TABLE users ADD index (sid(4));"); update_sql("ALTER TABLE users ADD index (timestamp);"); } function update_33() { $result = db_query("SELECT * FROM variable WHERE value NOT LIKE 's:%;';"); - // NOTE: the "WHERE"-part of the query above avoids variables to get serialized twice. + // NOTE: the "WHERE"-part of the query above avoids variables to get serialized twice. while ($variable = db_fetch_object($result)) { variable_set($variable->name, $variable->value); } } +function update_34() { + update_sql("ALTER TABLE feed MODIFY refresh int(10) NOT NULL default '0';"); + update_sql("ALTER TABLE feed MODIFY timestamp int (10) NOT NULL default '0';"); +} + function update_upgrade3() { update_sql("INSERT INTO system VALUES ('archive.module','archive','module','',1);"); update_sql("INSERT INTO system VALUES ('block.module','block','module','',1);"); |