We discussed this sometime ago in feature requests, and
you indicated that the following should work
<table name="applications" platform="mysql">
<opt name="type">ISAM</opt>
...
</table>
I've just had a chance to test this and it would seem
that, although the opt tag is parsed, it is ignored in
the create table sql (tested using mysqlt)
Logged In: YES
user_id=528997
This is holding my project back as well - I need the ability
to do innodb per-table. Using adodb's datadict I can, but
not in an xmlschema.
As a result, I've had to hardcode in a routine that runs an
alter table after every table create to switch them to
innodb - hardly portable. :)
Fixing this would be much appreciated!
Logged In: YES
user_id=822757
I've had a look at this and identified why this is not
working in xmlschema, and here is a suggested fix. The main
problem is that the createTableSQL in adodb is expecting an
associative array for tabopts, with the platform as the
index and the option as the value, e.g [mysql]=>'type=isam'.
xmlschema is actually sending a numeric array
([0]=>'type=isam'). adodb is ignoring this because the key
of the tabopt is not the database type.
In order to use the suggested fix, the opt element needs to
be defined in the following way, but I think this fits in
quite well with the general scheme of things
<table name="some_table">
<opt platform="mysql">TYPE=INNODB</opt>
<opt platform="db2">IN TABLESPACE AXY</opt>
etc etc......
These changes are based on the current version
adodb-xmlschema.inc.php from CVS
==============================================
In class dbTable (line 192 approx)
add var $currentOptPlatform;
in function _tag_open (line 252 approx)
add new case statement to switch( $this->currentElement )
case 'OPT':
$this->currentOptPlatform = $attributes['PLATFORM'];
break;
=============================================
in function addTableOpt (line 460 approx)
change $this->opts[] = $opt;
to
$this->opts[$this->currentOptPlatform] = $opt;
===============================================
With this method , all opts are passed to createtablesql,
which parses out the relevant ones
================================================
Logged In: YES
user_id=528997
Excellent! That would be fantastic... I look forward to the
next release with these changes in place!
Logged In: YES
user_id=302293
OK guys, I applied the proposed patch to CVS. Please check
it out, test it, and let me know how it works.
Rich
Logged In: YES
user_id=822757
I Just downloaded 1.61 from the CVS, and all this stuff
seems to have disappeared from code.