throw new UnexpectedException("SienaPlugin : not using GAE requires at least a db config");
}
if(dbType.contains("postgresql")){
persistenceManager = new PostgresqlPersistenceManager(new PlayConnectionManager(), null);
ddlType = "postgresql";
generator = new DdlGenerator("postgresql");
}else if(dbType.contains("h2")){
// the H2 dbMode in Play is "mysql"
persistenceManager = new H2PersistenceManager(new PlayConnectionManager(), null, "mysql");
// the DDL type is mysql because in play the DB is H2 in Mysql mode.
// But the DDLGenerator is wired to h2
// because longvarchar and CLOB is not managed the same way in H2/MYSQL and real MYSQL
ddlType = "mysql";
generator = new DdlGenerator("h2");
}
else if(dbType.contains("google")){
persistenceManager = new GoogleSqlPersistenceManager(new PlayConnectionManager(), null);
generator = new DdlGenerator("mysql");
}
else {
persistenceManager = new JdbcPersistenceManager(new PlayConnectionManager(), null);
generator = new DdlGenerator("mysql");
}
Logger.debug("Siena DDL Type: %s", ddlType);
// Alter tables before installing
for(Class<?> c : classes) {