Skip to content

Commit

Permalink
moodle16cleanup: mod/wiki synch upgrade script and .sql with mysql
Browse files Browse the repository at this point in the history
counterpart, drop the not null constraint to sync with postgres7.sql
  • Loading branch information
martinlanghoff committed May 17, 2006
1 parent c4ca8d4 commit 1b58a2f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions mod/wiki/db/postgres7.php
Expand Up @@ -145,6 +145,14 @@ function wiki_upgrade($oldversion) {
execute_sql("ALTER TABLE {$CFG->prefix}wiki_pages DROP COLUMN refs_base64"); execute_sql("ALTER TABLE {$CFG->prefix}wiki_pages DROP COLUMN refs_base64");
} }


if ($oldversion < 2006042801) {
modify_database('', 'ALTER TABLE prefix_wiki_pages
ALTER COLUMN content SET DEFAULT \'\',
ALTER COLUMN refs SET DEFAULT \'\',
ALTER COLUMN content DROP NOT NULL,
ALTER COLUMN refs DROP NOT NULL');
}

return true; return true;
} }


Expand Down
4 changes: 2 additions & 2 deletions mod/wiki/db/postgres7.sql
Expand Up @@ -52,12 +52,12 @@ CREATE TABLE prefix_wiki_pages (
pagename VARCHAR(160) NOT NULL, pagename VARCHAR(160) NOT NULL,
version INTEGER NOT NULL DEFAULT 0, version INTEGER NOT NULL DEFAULT 0,
flags INTEGER DEFAULT 0, flags INTEGER DEFAULT 0,
content bytea, content bytea DEFAULT '',
author VARCHAR(100) DEFAULT 'ewiki', author VARCHAR(100) DEFAULT 'ewiki',
userid INTEGER NOT NULL DEFAULT 0, userid INTEGER NOT NULL DEFAULT 0,
created INTEGER DEFAULT 0, created INTEGER DEFAULT 0,
lastmodified INTEGER DEFAULT 0, lastmodified INTEGER DEFAULT 0,
refs bytea, refs bytea DEFAULT '',
meta TEXT, meta TEXT,
hits INTEGER DEFAULT 0, hits INTEGER DEFAULT 0,
wiki INT8 NOT NULL wiki INT8 NOT NULL
Expand Down
2 changes: 1 addition & 1 deletion mod/wiki/version.php
Expand Up @@ -5,7 +5,7 @@
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php /// This fragment is called by moodle_needs_upgrading() and /admin/index.php
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////


$module->version = 2006042800; // The current module version (Date: YYYYMMDDXX) $module->version = 2006042801; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2005031000; // The current module version (Date: YYYYMMDDXX) $module->requires = 2005031000; // The current module version (Date: YYYYMMDDXX)
$module->cron = 0; // Period for cron to check this module (secs) $module->cron = 0; // Period for cron to check this module (secs)


Expand Down

0 comments on commit 1b58a2f

Please sign in to comment.