Issue Details (XML | Word | Printable)

Key: MDL-18053
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Minor Minor
Assignee: Petr Škoda (skodak)
Reporter: Brian King
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

install.xml not validated at install time in the same way as when using xmldb editor

Created: 27/Jan/09 10:20 PM   Updated: 07/Feb/09 08:12 PM
Component/s: Database SQL/XMLDB
Affects Version/s: 1.9.3
Fix Version/s: None

Database: Any
Participants: Brian King and Petr Škoda (skodak)
Security Level: None
Resolved date: 07/Feb/09
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
The following install.xml snippet installs fine on mysql, but displays errors when using the xmldb editor. I think it should display an error at install time, too. The problem is the key "unique12": it uses a limited-length column syntax that is valid on mysql, but not on other databases like postgresql.

<TABLE NAME="block_foo_required_courses" COMMENT="Maintains a list of the institution and department whose members are required to take a course" >

<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="courseid"/>
<FIELD NAME="courseid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="institution"/>
<FIELD NAME="institution" TYPE="char" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="courseid" NEXT="department"/>
<FIELD NAME="department" TYPE="char" NOTNULL="false" SEQUENCE="false" ENUM="false" PREVIOUS="institution"/>
</FIELDS>
<KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="unique12"/>
<KEY NAME="unique12" TYPE="unique" FIELDS="courseid, institution(130), department(130)" PREVIOUS="primary"/>

</KEYS>
</TABLE>



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Škoda (skodak) added a comment - 07/Feb/09 08:12 PM
please ALWAYS use editor when modifying install.xml files or at least validate it with this tool