sake92 / squery

Simple SQL queries in Scala 3
https://sake92.github.io/squery
Apache License 2.0
17 stars 0 forks source link

Generate table utils from db #8

Closed sake92 closed 2 months ago

sake92 commented 10 months ago

This would have to be an sbt/mill plugin probably. We could make it generate inline strings, this way it should be easier to analyze by a scalafix linter, and compiler..

https://scastie.scala-lang.org/pPqxz7yFR2mexhYK5yGqzQ

sake92 commented 10 months ago

Umm, what about chicken and egg problem??
If we run migrations with Flyway, we can't have one-command action (in the app code!) that:

We'd have to use a flyway plugin in mill.sc ..
Similar to https://www.jooq.org/doc/latest/manual/getting-started/tutorials/jooq-with-flyway/

Then the first 2 steps would be separate from the app.
I guess this is good for development.
Then we can commit our stuff, push and all good.
The only thing I dislike is this double-migrations execution..

sake92 commented 10 months ago

https://mill-build.com/mill/contrib/flyway.html

We could merge flyway-plugin + generate-squery-stuff into one task of course

sake92 commented 2 months ago

Done!
We now have a mill plugin that does this