use of org.hibernate.tool.hbm2ddl.SchemaExport in project hibernate-orm by hibernate.
the class SchemaExportWithIndexAndDefaultSchema method shouldCreateIndex.
@Test
public void shouldCreateIndex() {
SchemaExport schemaExport = new SchemaExport();
schemaExport.create(EnumSet.of(TargetType.DATABASE, TargetType.STDOUT), metadata);
assertThat(schemaExport.getExceptions().size(), is(0));
}
use of org.hibernate.tool.hbm2ddl.SchemaExport in project hibernate-orm by hibernate.
the class SchemaExportWithIndexAndDefaultSchema method tearDown.
@After
public void tearDown() {
System.out.println("********* Starting SchemaExport (drop) for TEAR-DOWN *************************");
new SchemaExport().drop(EnumSet.of(TargetType.DATABASE, TargetType.STDOUT), metadata);
System.out.println("********* Completed SchemaExport (drop) for TEAR-DOWN *************************");
StandardServiceRegistryBuilder.destroy(serviceRegistry);
serviceRegistry = null;
}
use of org.hibernate.tool.hbm2ddl.SchemaExport in project hibernate-orm by hibernate.
the class SchemaMigrationTargetScriptCreationTest method tearDown.
@After
public void tearDown() {
ServiceRegistry serviceRegistry = ServiceRegistryBuilder.buildServiceRegistry(Environment.getProperties());
try {
MetadataImplementor metadata = (MetadataImplementor) new MetadataSources(serviceRegistry).addAnnotatedClass(TestEntity.class).buildMetadata();
metadata.validate();
new SchemaExport().drop(EnumSet.of(TargetType.DATABASE, TargetType.STDOUT), metadata);
} finally {
ServiceRegistryBuilder.destroy(serviceRegistry);
}
}
use of org.hibernate.tool.hbm2ddl.SchemaExport in project hibernate-orm by hibernate.
the class SchemaUpdateWithFunctionIndexTest method tearDown.
@After
public void tearDown() {
dropFunctionIndex();
dropTable();
new SchemaExport().drop(EnumSet.of(TargetType.DATABASE, TargetType.STDOUT), metadata);
StandardServiceRegistryBuilder.destroy(serviceRegistry);
}
use of org.hibernate.tool.hbm2ddl.SchemaExport in project hibernate-orm by hibernate.
the class SchemaUpdateWithViewsTest method tearDown.
@After
public void tearDown() {
dropView();
System.out.println("********* Starting SchemaExport (drop) for TEAR-DOWN *************************");
new SchemaExport().drop(EnumSet.of(TargetType.STDOUT, TargetType.DATABASE), metadata);
System.out.println("********* Completed SchemaExport (drop) for TEAR-DOWN *************************");
StandardServiceRegistryBuilder.destroy(serviceRegistry);
serviceRegistry = null;
}
Aggregations