Skip to content

Use JSON schema validation during Validate phase #673

@andrew-farries

Description

@andrew-farries

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'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions