|
|
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>
|
|
Description
|
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>
|
Show » |
|