Skip to content

Normalize migrations before computing checksum #374

@tmpfs

Description

@tmpfs

Hi,

Thanks for the library!

I've come across something of an esoteric edge case and I have a hunch it's to do with Windows \r\n line endings but first some context.

I have a cross-platform app that allows users to create backup ZIP archives that contain an SQLite database (along with a bunch of other files). When these backups are restored into the app we run migrations to make sure the database is up to date with the latest schema.

To test this logic I have fixtures in the test suite of valid ZIP archives. If I generate the test fixtures on a *NIX machine and then run the test suite on Windows the migrations fail to apply (it says the filesystem one is different to the applied one). However, if i generate the backup ZIP archives on Windows all is well.

I wonder if you could have some insight into where the inconsistency might be? Would it be reasonable to always remove \r in migration source files?

Thanks 🙏

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions