We have developed an application in java running on jboss that uses
mysql as the database with hibernate persistence. Hibernate
automatically creates all the associated mysql tables, but at present
we have to create a schema manually using mysql's admin GUI on a new
machine. We want to make deployment of the application (built into a
single .war file) as automated as possible.
Is there a way to create the initial 'schema' (CREATE DATABASE) using
java code rather than manually? E.g. through the hibernate or JDBC
libraries.
John Currier - 19 Sep 2005 14:26 GMT
> We have developed an application in java running on jboss that uses
> mysql as the database with hibernate persistence. Hibernate
[quoted text clipped - 6 lines]
> java code rather than manually? E.g. through the hibernate or JDBC
> libraries.
Google for hbm2ddl.auto.
John
http://schemaspy.sourceforge.net
Alfred - 27 Sep 2005 16:23 GMT
> ...
> Is there a way to create the initial 'schema' (CREATE DATABASE) using
> java code rather than manually? E.g. through the hibernate or JDBC
> libraries.
Ask the MySQL Guide.
Good luck