Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Apply sql before and after migrations #13

@pleshevskiy

Description

@pleshevskiy

Is your feature request related to a problem? Please describe.

In my daily work with the database, I need to run the script before and after migrations.

Describe the solution you'd like

I'm thinking of giving the option to add an option to the manifest

[migrations]
exec_before = ["DROP SCHEMA IF EXISTS imp CASCADE;"]
apply_after_up = ["imp_schema"]

and possibly options in cli

migra up --before drop-schema --after imp-schema
migra down --exec-before "DROP SCHEMA IF EXISTS imp CASCADE;"

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions