Skip to content

[cli] repeatable / always migrations #871

Open
@mehcode

Description

@mehcode

Proposal:

cargo sqlx migrate add --always name

Generates:

migrations/version_name.always.sql

Behavior would be that the migration is re-applied whenever its checksum changes. The primary use-case for this would be for view definitions.

I'm open to ideas for better naming here. But I think the feature itself is important. Currently, views are a bit annoying to use in SQLx because you can't create them outside of migrations to have type checking and because migration files can't easily be changed they keep requiring you to add more migration files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions