sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

Glob support

Open zmitry opened this issue 3 years ago • 2 comments

Hi, in our app we have migrations in different structure like this 12321_folder/{up.sql, down.sql} and current approach doesn't really work for us. Current change is kind of breaking change but maybe it's ok as it is.

zmitry avatar Mar 30 '22 14:03 zmitry

Glob support would be great for us as well since we're using tern, which supports environment variables in migrations via its templates, for our migrations. We'd like to just exclude the migrations that have environment variables as we don't need models to be generated for them but this is not currently possible as we just have to provide a directory to sqlc.

benefacto avatar Aug 24 '22 12:08 benefacto

@benefacto Could you provide a full example on how you'd use glob support to exclude those migrations?

I also just created https://github.com/kyleconroy/sqlc/issues/1824 to track adding official tern support.

kyleconroy avatar Aug 29 '22 04:08 kyleconroy