Skip to content

allow customizing the template for migration files generated with the sqlx CLI #4389

Description

@svix-jbrown

I have found these related issues/pull requests

Didn't find any

Description

Right now, the templates put into new migrations from the sqlx CLI are hardcoded in the MigrationType impl block. We would like to override them in our environment to have more context, but then we're at the point of dropping the sqlx CLI and just making the migrations with some other tool, which is unfortunate.

Prefered solution

sqlx.toml should have a section to override the templates for up, down, and simple migrations

Is this a breaking change? Why or why not?

No, if the section isn't in the TOML file it could just use the hardcoded templates

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions