Defining databases in subfolder tree #3527
-
I am currently evaluating atlas for deployment. I would like to store the database files in the following structure:
I can't seem to get atlas to recognise the files in the sub folders. Can someone provide a simple sample of how this should be configured? We have too many objects in the database to include everything into one hcl file. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @david-rowland-rozettatech, Atlas supports the Here’s how you can use it in your case: data "hcl_schema" "app" {
paths = fileset("schemas/**/*.hcl")
}
env "output" {
schema {
src = data.hcl_schema.app.url
}
dev = "sqlite://file::memory:?cache=shared"
} Then, you can run a command like this: atlas schema diff --env output --from "sqlite://test.db" --to env://src To improve the developer experience, we’ve also built IDE plugins: With the Atlas plugin for JetBrains, you can easily navigate, edit, and reference resources across folders. To set it up:
Let me know if you need help setting it up! |
Beta Was this translation helpful? Give feedback.
Hi @david-rowland-rozettatech,
Atlas supports the
fileset
function, which allows you to load multiple files matching a specific pattern. This is especially useful when you want to treat several files as a single input source.Here’s how you can use it in your case:
Then, you can run a command like this:
atlas schema diff --env output --from "sqlite://test.db" --to env://src
To improve the developer experience, we’ve also built IDE plugins:
With the Atlas plugin for JetBrains, …