Skip to content

Add tests to guard against accidental modification of Flyway migrations #10776

Open
@aalbu

Description

@aalbu

Versioned Flyway migrations are intended to be applied only once. Consequently, they should be immutable. Flyway records a checksum of the migration after it is applied, to prevent accidental modification. Modifying a migration will cause Flyway to fail when the migration is applied.

We should have tests that prevent situations like that. Current tests start with an empty database and verify that migrations are properly applied. A more realistic scenario would be to run Flyway against a database that already had some migrations applied. For example, the database could be "primed" with the migrations present in the previous Trino release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxIssues or pull requests related to developer experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions