mirror of
https://github.com/getrebuild/rebuild.git
synced 2024-11-11 01:14:42 +08:00
fix: Throw ex on DDL fails
This commit is contained in:
parent
d77e0318a2
commit
452d0a034f
2 changed files with 4 additions and 4 deletions
|
@ -157,13 +157,13 @@ public class Entity2Schema extends Field2Schema {
|
|||
} catch (Throwable ex) {
|
||||
LOG.error(null, ex);
|
||||
Application.getCommonService().delete(tempMetaId.toArray(new ID[0]));
|
||||
return null;
|
||||
throw new ModifiyMetadataException("元数据初始化失败 : " + ex.getLocalizedMessage());
|
||||
}
|
||||
|
||||
boolean schemaReady = schema2Database(tempEntity);
|
||||
if (!schemaReady) {
|
||||
Application.getCommonService().delete(tempMetaId.toArray(new ID[0]));
|
||||
return null;
|
||||
throw new ModifiyMetadataException("无法创建表到数据库");
|
||||
}
|
||||
|
||||
Application.getMetadataFactory().refresh(false);
|
||||
|
|
Loading…
Reference in a new issue