Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

moodle16cleanup: mod/wiki synch upgrade script and .sql with mysql

counterpart, drop the not null constraint to sync with postgres7.sql
  • Loading branch information...
commit 1b58a2f3a0e11b0f0faf75945362c81238525c03 1 parent c4ca8d4
martinlanghoff authored
8 mod/wiki/db/postgres7.php
@@ -145,6 +145,14 @@ function wiki_upgrade($oldversion) {
145 145 execute_sql("ALTER TABLE {$CFG->prefix}wiki_pages DROP COLUMN refs_base64");
146 146 }
147 147
  148 + if ($oldversion < 2006042801) {
  149 + modify_database('', 'ALTER TABLE prefix_wiki_pages
  150 + ALTER COLUMN content SET DEFAULT \'\',
  151 + ALTER COLUMN refs SET DEFAULT \'\',
  152 + ALTER COLUMN content DROP NOT NULL,
  153 + ALTER COLUMN refs DROP NOT NULL');
  154 + }
  155 +
148 156 return true;
149 157 }
150 158
4 mod/wiki/db/postgres7.sql
@@ -52,12 +52,12 @@ CREATE TABLE prefix_wiki_pages (
52 52 pagename VARCHAR(160) NOT NULL,
53 53 version INTEGER NOT NULL DEFAULT 0,
54 54 flags INTEGER DEFAULT 0,
55   - content bytea,
  55 + content bytea DEFAULT '',
56 56 author VARCHAR(100) DEFAULT 'ewiki',
57 57 userid INTEGER NOT NULL DEFAULT 0,
58 58 created INTEGER DEFAULT 0,
59 59 lastmodified INTEGER DEFAULT 0,
60   - refs bytea,
  60 + refs bytea DEFAULT '',
61 61 meta TEXT,
62 62 hits INTEGER DEFAULT 0,
63 63 wiki INT8 NOT NULL
2  mod/wiki/version.php
@@ -5,7 +5,7 @@
5 5 /// This fragment is called by moodle_needs_upgrading() and /admin/index.php
6 6 /////////////////////////////////////////////////////////////////////////////////
7 7
8   -$module->version = 2006042800; // The current module version (Date: YYYYMMDDXX)
  8 +$module->version = 2006042801; // The current module version (Date: YYYYMMDDXX)
9 9 $module->requires = 2005031000; // The current module version (Date: YYYYMMDDXX)
10 10 $module->cron = 0; // Period for cron to check this module (secs)
11 11

0 comments on commit 1b58a2f

Please sign in to comment.
Something went wrong with that request. Please try again.