Hello,
I'm creating my database schema from the Annotations on Java classes. Previously all my tables have been created as MyIsam tables on MySql. I'm using the org.hibernate.dialect.MySQLDialect dialect.
I have a requirement now to create some new tables to co-exist in the same MySql database as InnoDb.
I'd like to create these as Java classes, annotate them and get them to create the tables when I run up my application the first time.
So my requirement is for, on a clean installation, some tables to be created with MyIsam and some with InnoDb.
I cannot see an annotation or other way to allow this.
I can see it is possible to change the dialect but I want to use the same connection for accessing both so I need a way to specify which tables are which database engine.
One option is to after running the application up to run a SQL script to alter that table thus:
ALTER TABLE CPS_ASSIGNED ENGINE = InnoDB;
However it would be nicer for not need this post-release script.
If anyone had any suggestions I would be very grateful.
Kind regards
Pete
|