I had a docker container used for database migrati...
# general
e
I had a docker container used for database migrations, Its a flyway container that I basically just copied a bunch of sql files into. (they were a
files
target, because I wasn't aware of
sql_source
at first). Then I thought, it would be nice to have linting, so I changed to a
sql_sources
target and enabled
sqlfluff
. My current problem is: The sql files are now a
resource
type target, and as such, they don't get copied into the sandbox for my docker build. What's the best way to get this working?
s
hmm, that's annoying I know we have
experimental_wrap_as_resources
but that turns files into resources, not the other way around I can think of only creating another target
files()
that has all the same sources included
what do you use for database migrations? if alembic, it might be easier to build a pex_binary with sql instead
e
We use flyway, and since its a big k8s deployment, its just a dedicated init container with flyway and some raw sql files in it.
s
yeah, then probably duplicate
files
will do the trick