Details
-
Improvement
-
Resolution: Unresolved
-
Medium
-
None
-
2011.9
-
None
Description
I have 2 tables (under MySQL), one is under MyISAM (and has to be in that format), and the other is under the common InnoDB
Both of them are using the common utf8 charset, and both of them have a comment (a text string explaining the table)
=> Would be nice to export those data in the db_schema.dba, so that they can be imported back in mysql
Of course, you may wonder 'hey! no specific stuff for one database, e.g. mysql', you're right, but a charset and a comment for a table are common things in the other database systems no ? (really dunno, I just ask I guess it exists as it's a nice feature to have...)
concerning the engine of the table, of course, it's specific to the database, but we could export this info as table_type => 'mysql:innodb'
That way, the owner of the db_schema.dba may add table_type => 'mysql:innodb;postgres:superengine', in order to choose the engine to use to create the table (in several database systems) if the database system proposes several engines
I've done a patch for this indeed, I'll do, in a few moment, a pull request for code analysis, discussion...
One part of this patch is to use more heavily the eZMysqlSchema::generateTableOption() method, to define the string to add just after the CREATE TABLE (...), it may contain "DELAY_KEY_WRITE=1", but also the ENGINE=..., DEFAULT CHARACTER SET ...., COMMENT='...'
All of those are just options for mysql...
At least, this part could be merged, for more genericity