mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Convert fields refs and content in wiki_pages to binary for postgres
This commit is contained in:
parent
c6f32032ea
commit
e989c7699a
3 changed files with 11 additions and 3 deletions
|
@ -125,6 +125,14 @@ function wiki_upgrade($oldversion) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($oldversion < 2006032900) {
|
||||||
|
global $db;
|
||||||
|
$data = $db->GetAll("SELECT id,refs FROM {$CFG->prefix}wiki_pages");
|
||||||
|
foreach ($data as $d) {
|
||||||
|
$db->AutoExecute("{$CFG->prefix}wiki_pages", array('refs_base64' => base64_encode($d['refs'])), 'UPDATE', 'id = '.$d['id']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 TEXT,
|
content bytea,
|
||||||
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 TEXT,
|
refs bytea,
|
||||||
meta TEXT,
|
meta TEXT,
|
||||||
hits INTEGER DEFAULT 0,
|
hits INTEGER DEFAULT 0,
|
||||||
wiki INT8 NOT NULL
|
wiki INT8 NOT NULL
|
||||||
|
|
|
@ -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 = 2005031000; // The current module version (Date: YYYYMMDDXX)
|
$module->version = 2006032900; // 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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue