Skip to content

Execute migrations in Postgres for greater context into rules  #18

@froque

Description

@froque
  • Execute migration files in a Testcontainers or io.zonky.test:embedded-postgres to get greater insights into if a SQL migration is safe or not.
  • drop table rule #17 is an example of a migration that could benefit from context of the table to be dropped
  • adding-field-with-default is another example that could benefit from further context
  • changing-column-type is another example that could benefit from further context (checking pg_catalog.pg_cast)

Maybe add an option to disable for situations that the existing migration files don't represent 100% of the state of the database.

Open questions:

  • What is the order to run the migrations ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions