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

Apply sql before and after migrations #13

Open
pleshevskiy opened this issue Jul 3, 2021 · 0 comments
Open

Apply sql before and after migrations #13

pleshevskiy opened this issue Jul 3, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@pleshevskiy
Copy link
Owner

pleshevskiy commented Jul 3, 2021

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;"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant