pgroll icon indicating copy to clipboard operation
pgroll copied to clipboard

Use JSON schema validation during `Validate` phase

Open andrew-farries opened this issue 9 months ago • 2 comments

pgroll defines a JSON schema for migration file validation, used by third-party tools such as the Xata migration editor, but does not use the schema for itself during migration validation.

pgroll should use JSON schema validation during the Validate phase of a migration to rule out obvious errors in migrations such as missing fields. Currently some, but not all, of the checks that JSON schema validation would perform are done by hand in the various Validate methods for each operation.

Using JSON schema validation would allow removal of many of these checks, leaving only 'semantic' checks in Validate methods such as 'does the table the operation attempts to modify exist in the schema'.

andrew-farries avatar Feb 11 '25 07:02 andrew-farries

hi, I would like to take this issue. could you assign it to me?

astorig avatar Feb 11 '25 11:02 astorig

Hello @astorig apologies I've missed this before. Would you be still interested in giving a hand and taking this issue? Thanks!

gulcin avatar Apr 10 '25 11:04 gulcin