Menu

#22 Original table names can't start with underscore (_)

open
core (13)
5
2006-03-05
2006-03-05
No

If the xml schema has a table name that begins with
an underscore, the parser fails.

I build the XML from a database using ExtractSchema
() -- when I then try to 'undo' that xml file using
ParseSchema() => it breaks. It appears that the
table name 'sometimes' cannot start with a single or
double underscore (field names apparently can).

This is using mysql.

monte

{x:

// sample output of XML from database dump

<?xml version="1.0"?>
<schema version="0.2">
<table name="__history">
<field name="history_id" type="I"
size="11">
<KEY/>
<DEFAULT value="0"/>
</field>
<field name="user_id" type="C"
size="255">
<NOTNULL/>
</field>
<field name="occurred" type="T">
<NOTNULL/>
<DEFAULT value="0000-00-00
00:00:00"/>
</field>
<field name="module" type="C"
size="255">
<NOTNULL/>
</field>
<field name="key_value" type="C"
size="255">
<NOTNULL/>
</field>
<field name="action" type="C"
size="255">
<NOTNULL/>
</field>
<field name="from_value" type="C"
size="255">
<NOTNULL/>
</field>
<field name="to_value" type="C"
size="255">
<NOTNULL/>
</field>
<field name="rollback_sql" type="X">
<NOTNULL/>
</field>
</table>
<table name="__languages">
<field name="code" type="C" size="15">
<KEY/>
</field>
<field name="language" type="C"
size="50">
<NOTNULL/>
</field>
<field name="region" type="C"
size="50">
<NOTNULL/>
</field>
</table>
</schema>

Discussion


Log in to post a comment.