fordfrog / apgdiff

Another PostgreSQL Diff Tool
http://www.apgdiff.com
MIT License
355 stars 138 forks source link

Fix CommentParser.java #256

Closed d1maxa closed 5 years ago

d1maxa commented 5 years ago

Need to fix functions parseTrigger and parseConstraint. parseConstraint: final String schemaName = ParserUtils.getSchemaName(constraintName, database) to final String schemaName = ParserUtils.getSchemaName(tableName, database)

because constraintname doesn't contain schema's name: COMMENT ON CONSTRAINT "cd_departments_fkey_f_org" ON "registry"."cd_departments" IS 'simple constraint';

Same for parseTrigger: final String schemaName = ParserUtils.getSchemaName(constraintName, database) to final String schemaName = ParserUtils.getSchemaName(tableName, database) comment example: COMMENT ON TRIGGER "update_count" ON "registry"."cd_departments" IS 'simple trigger';

elmaxid commented 3 years ago

I have the same issue. I had to remove the comment and works!. M.