in jbang/karaf-blueprint/DatabaseInitializationBean.java [41:65]
public void create() throws Exception {
LOG.info("Creating database tables ...");
if (connection == null) {
EmbeddedDriver driver = new EmbeddedDriver();
connection = driver.connect(url + ";create=true", null);
}
String sql = "create table ORDERS (\n"
+ " ORD_ID integer primary key,\n"
+ " ITEM varchar(10),\n"
+ " ITEM_COUNT varchar(5),\n"
+ " ITEM_DESC varchar(30),\n"
+ " ORD_DELETED boolean\n"
+ ")";
try {
execute("drop table orders");
} catch (Throwable e) {
// ignore
}
execute(sql);
LOG.info("Database tables created");
}