Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional migrations #19

Open
aleksanderaleksic opened this issue Aug 13, 2021 · 0 comments
Open

Conditional migrations #19

aleksanderaleksic opened this issue Aug 13, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@aleksanderaleksic
Copy link
Owner

In the migration block I am imagining a way to set conditionals for if a migration should run.

Some conditionals can be:

  • don't run after a given date (this can be nice if you are setting up a new environment with your config and so you don't have to skip all the migrations for it)
  • Variable conditions, to allow you to for instance only run a migration if it matches a variable in the config variables inputed.

Example of the block:

migration {
 condition {
   test = "OnlyBefore"
   Value = "2021-08-14T00:00"
 }
 condition {
  test = "MatchesEnvironment"
  value = [
     "dev",
     "prod"
   ]
 }
}
@aleksanderaleksic aleksanderaleksic added the enhancement New feature or request label Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant