mirror of
https://github.com/moodle/moodle.git
synced 2025-08-08 02:16:41 +02:00
utf8 migration support scripts
This commit is contained in:
parent
bbbb201364
commit
1e4d9ff6dc
36 changed files with 4767 additions and 0 deletions
80
mod/lesson/db/migrate2utf8.xml
Executable file
80
mod/lesson/db/migrate2utf8.xml
Executable file
|
@ -0,0 +1,80 @@
|
|||
<DBMIGRATION type="mod/lesson" VERSION="2005120100">
|
||||
<TABLES>
|
||||
<TABLE name="lesson_attempt">
|
||||
<FIELDS>
|
||||
<FIELD name="useranswer" method="PLAIN_SQL_UPDATE" type="text" length="0">
|
||||
<SQL_DETECT_USER>
|
||||
SELECT la.userid
|
||||
FROM {$CFG->prefix}lesson_attempt la
|
||||
WHERE la.id=RECORDID
|
||||
</SQL_DETECT_USER>
|
||||
<SQL_DETECT_COURSE>
|
||||
SELECT l.course
|
||||
FROM {$CFG->prefix}lesson l,
|
||||
{$CFG->prefix}lesson_attempt la
|
||||
WHERE l.id = la.lessonid
|
||||
AND la.id = RECORDID
|
||||
</SQL_DETECT_COURSE>
|
||||
</FIELD>
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="lesson_high_scores">
|
||||
<FIELDS>
|
||||
<FIELD name="nickname" method="NO_CONV" type="varchar" length="5" />
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="lesson_answers">
|
||||
<FIELDS>
|
||||
<FIELD name="answer" method="PHP_FUNCTION" type="text" length="0">
|
||||
<PHP_FUNCTION>
|
||||
migrate2utf8_lesson_answers_answer(RECORDID)
|
||||
</PHP_FUNCTION>
|
||||
</FIELD>
|
||||
<FIELD name="response" method="PHP_FUNCTION" type="text" length="0">
|
||||
<PHP_FUNCTION>
|
||||
migrate2utf8_lesson_answers_answer(RECORDID)
|
||||
</PHP_FUNCTION>
|
||||
</FIELD>
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="lesson_default">
|
||||
<FIELDS>
|
||||
<FIELD name="password" method="PHP_FUNCTION" type="varchar" length="32">
|
||||
<PHP_FUNCTION>
|
||||
migrate2utf8_lesson_default_password(RECORDID)
|
||||
</PHP_FUNCTION>
|
||||
</FIELD>
|
||||
<FIELD name="bgcolor" method="NO_CONV" type="varchar" length="7" />
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="lesson_pages">
|
||||
<FIELDS>
|
||||
<FIELD name="title" method="PHP_FUNCTION" type="varchar" length="255">
|
||||
<PHP_FUNCTION>
|
||||
migrate2utf8_lesson_pages_title(RECORDID)
|
||||
</PHP_FUNCTION>
|
||||
</FIELD>
|
||||
<FIELD name="contents" method="PHP_FUNCTION" type="text" length="0">
|
||||
<PHP_FUNCTION>
|
||||
migrate2utf8_lesson_pages_content(RECORDID)
|
||||
</PHP_FUNCTION>
|
||||
</FIELD>
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
<TABLE name="lesson">
|
||||
<FIELDS>
|
||||
<FIELD name="name" method="PLAIN_SQL_UPDATE" type="varchar" length="255">
|
||||
<PHP_FUNCTION>
|
||||
migrate2utf8_lesson_name(RECORDID)
|
||||
</PHP_FUNCTION>
|
||||
</FIELD>
|
||||
<FIELD name="password" method="PHP_FUNCTION" type="varchar" length="32">
|
||||
<PHP_FUNCTION>
|
||||
migrate2utf8_lesson_password(RECORDID)
|
||||
</PHP_FUNCTION>
|
||||
</FIELD>
|
||||
<FIELD name="bgcolor" method="NO_CONV" type="varchar" length="7" />
|
||||
</FIELDS>
|
||||
</TABLE>
|
||||
</TABLES>
|
||||
</DBMIGRATION>
|
Loading…
Add table
Add a link
Reference in a new issue