class SetupDataBaseService {

    public boolean tableConsistent(String catalog) throws Exception {
        Set<String> catalogTableNames = setupDBDao.getCatalogTableNames(catalog);
        if (CollectionUtils.isEmpty(catalogTableNames)) {
            return false;
        }
        String scriptContent = ResourceUtil.getSingleInstance().getScriptContent(SCRIPT_FILE);
        Set<String> scriptTableNames = getScriptTableNames(scriptContent);
        if (CollectionUtils.isNotEmpty(scriptTableNames)) {
            for (String tableName : scriptTableNames) {
                if (!catalogTableNames.contains(tableName)) {
                    return false;
                }
            }
        }
        return true;
    }

}