1 package org.smartcomps.twister.util.db;
2
3 import net.sf.hibernate.tool.hbm2ddl.SchemaExport;
4 import net.sf.hibernate.cfg.Configuration;
5 import net.sf.hibernate.HibernateException;
6
7 /***
8 * A simple utility that creates the database schema with all tables necessary to Twister.
9 */
10 public class SchemaCreator {
11
12 public static void createSchema() throws HibernateException {
13 SchemaExport schemaExport = new SchemaExport(new Configuration().configure());
14 schemaExport.create(true, true);
15 }
16
17 public static void main(String[] args) {
18 try {
19 createSchema();
20 } catch (HibernateException e) {
21 e.printStackTrace();
22 }
23 }
24 }
This page was automatically generated by Maven