Referencing nested migration files #1204
Replies: 1 comment 1 reply
-
Hey @malliaridis, thank you for your questions, I will try to answer them 😊 Currently, Atlas does not support nested / recursive migration directories. Only
Your assumption is correct.
If Atlas CLI does not find the configred env, it returns an error:
If this error does occur, but your configuration still does not work, you might have found a bug. Currently, we have no integration testing for windows set up (shame on us 🤦), so it might be a windows issue as well. If you find the time, can you send me a reproducible example repo, where I can check why the values of the configuration file are not used? |
Beta Was this translation helpful? Give feedback.
-
Hey there (again), I have one more question about migration files and organizing those.
I was trying yesterday to find a way to configure
atlas.hcl
(under Windows) in a way that the following/migrations
file structure could be found without adding the individual files:Below are the configurations I tried in
atlas.hcl
without success (validated everything withatlas migrate hash --env local
and the output inatlas.sum
):env.src
and/orenv.migration.dir
tofile://migrations/*
env.src
and/orenv.migration.dir
to["file://migrations/v0", "file://migrations/v1"]
env.src
and/orenv.migration.dir
to absolute path (Windows)file:///C:/Users/PATH/TO/PROJECT/migrations/v0
(only one directory)env.src
and/orenv.migration.dir
to relative path (Windows)./migrations/v0
(only one directory)I assume that for migrations, the
env.migration.dir
is the property I want to override, but I triedenv.src
too just for the sake of completeness.What works is when I place the files in
/migrations
without sub-directories and executeatlas migrate hash
. However, theenv
configurations are completely ignored, even if I provide--env local
.At the end, I was wondering if the properties were used, so I tried an empty string, but no error occurred (so they were ignored completely I guess?). Am I missing something here?
Here is the structure / content of the `atlas.hcl` file I used
Beta Was this translation helpful? Give feedback.
All reactions