Open synchrone opened 6 years ago
That looks pretty cool. I can see how it would simplify code and at the same time open many more databases up. And you already have to install a DB client anyway, so its not a huge increase in dependency.
On the down side, the test coverage is not great, it has a (stated) bias towards supporting PostgreSql and the project history is not very long.
Holy shit, their supported database table now includes 27 different persistence backends, including a bunch of NoSQL ones. And its Go, so it runs on Windows ... I wonder if shmig runs in git-bash (part of git-for-windows).
Hmmm ... maybe make this optional. If it exists on the path then use if, otherwise fall back to the normal clients.
dont like this idea, I'm using shmig only to be able to use \include
psql statement in migrations, https://github.com/lib/pq doesn't support psql statements
-- file 0000000001-start.sql
-- ==== UP ====
begin;
\include 0000000001-start/prelude.up.sql
\include 0000000001-start/utils.up.sql
\include 0000000001-start/rabbitmq.up.sql
commit;
-- ==== DOWN ====
-- do nothing, this should never happen
dont like this idea, I'm using shmig only to be able to use
\include
psql statement in migrations, https://github.com/lib/pq doesn't support psql statements
My thought was to use usql if it's found on the current path, and otherwise fall back to existing behavior.
Would that work for you?
@mbucc yes
There is a project aiming at a single CLI for any* database: https://github.com/xo/usql It looks like a worthy candidate