Title: ODE Schema
***Database scripts for fresh installation of ODE 1.3.7 is now packaged within the distribution archive.***
## ODE 1.3.6 - 1.3.7
Migration is necessary from 1.3.6, read the migration script available [here](https://github.com/apache/ode/blob/APACHE_ODE_1.3.7/schema-updates/migrate-ode-1.3.6-to-1.3.7.sql).
## ODE 1.3.4 - 1.3.6
ODE 1.3.4, 1.3.5 and 1.3.6 share the same schema definitions.
### For use with OpenJPA
* [ode-1.3.4-jpa-mysql.sql](/sql/ode-1.3.4-jpa-mysql.sql) (for MySQL < 5.5)
* [ode-1.3.4-jpa-mysql55.sql](/sql/ode-1.3.4-jpa-mysql55.sql) (for MySQL >= 5.5)
* [ode-1.3.4-jpa-postgres.sql](/sql/ode-1.3.4-jpa-postgres.sql)
* [ode-1.3.4-jpa-oracle.sql](/sql/ode-1.3.4-jpa-oracle.sql)
* [ode-1.3.4-jpa-h2.sql](/sql/ode-1.3.4-jpa-h2.sql)
### For use with Hibernate
* [ode-1.3.4-hib-mysql.sql](/sql/ode-1.3.4-hib-mysql.sql) (for MySQL < 5.5)
* [ode-1.3.4-hib-mysql55.sql](/sql/ode-1.3.4-hib-mysql55.sql) (for MySQL >= 5.5)
* [ode-1.3.4-hib-pgsql.sql](/sql/ode-1.3.4-hib-pgsql.sql)
* [ode-1.3.4-hib-oracle.sql](/sql/ode-1.3.4-hib-oracle.sql)
* [ode-1.3.4-hib-h2.sql](/sql/ode-1.3.4-hib-h2.sql)
## Configuring Hibernate
In order to run ODE 1.3.6 under Hibernate, you need to grab external
dependencies (and accept Hibernate license). [This script](https://github.com/vanto/apache-ode-tomcat-bundle)
can be used to create a fully configured bundle with Apache Tomcat, Hibernate, and Bitronix.
## Configuring H2 Database
Run this:
:::text
java -cp h2-1.1.117.jar org.h2.tools.RunScript -url 'jdbc:h2:file:ode-db;DB_CLOSE_ON_EXIT=false;user=sa' -showResults -script ode-1.3.4-hib-h2.sql
Then you will get ode-db* files in directory.
Then edit ode-axis2.properties and set:
:::text
ode-axis2.dao.factory=org.apache.ode.daohib.bpel.BpelDAOConnectionFactoryImpl
ode-axis2.db.mode=INTERNAL
ode-axis2.db.int.jdbcurl=jdbc:h2:file:ode-db;DB_CLOSE_ON_EXIT=false;user=sa
ode-axis2.db.int.driver=org.h2.Driver
hibernate.dialect=org.hibernate.dialect.H2Dialect
## Upgrade from previous versions
Please refer to this page: [Upgrading ODE](/upgrading-ode.html)