go/mirko: add SQL migrations machinery
This uses github.com/golang-migrate/migrate and adds a Source that
allows using go_embed data files.
We also provide a test/example.
Change-Id: Icd2b6c7f7d0f728073b3fdf39b432b33ce61a3cd
diff --git a/WORKSPACE b/WORKSPACE
index 5011b83..4b246c7 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -601,6 +601,56 @@
)
go_repository(
+ name = "com_github_jmoiron_sqlx",
+ commit = "38398a30ed8516ffda617a04c822de09df8a3ec5",
+ importpath = "github.com/jmoiron/sqlx",
+)
+
+go_repository(
+ name = "com_github_lib_pq",
+ commit = "3427c32cb71afc948325f299f040e53c1dd78979",
+ importpath = "github.com/lib/pq",
+)
+
+go_repository(
+ name = "com_github_gchaincl_sqlhooks",
+ commit = "1932c8dd22f2283687586008bf2d58c2c5c014d0",
+ importpath = "github.com/gchaincl/sqlhooks",
+)
+
+go_repository(
+ name = "com_github_golang_migrate_migrate_v4",
+ commit = "e93eaeb3fe21ce2ccc1365277a01863e6bc84d9c",
+ importpath = "github.com/golang-migrate/migrate/v4",
+ remote = "https://github.com/golang-migrate/migrate",
+ vcs = "git",
+)
+
+go_repository(
+ name = "com_github_hashicorp_go_multierror",
+ commit = "bdca7bb83f603b80ef756bb953fe1dafa9cd00a2",
+ importpath = "github.com/hashicorp/go-multierror",
+)
+
+go_repository(
+ name = "com_github_hashicorp_errwrap",
+ commit = "8a6fb523712970c966eefc6b39ed2c5e74880354",
+ importpath = "github.com/hashicorp/errwrap",
+)
+
+go_repository(
+ name = "com_github_cockroachdb_cockroach_go",
+ commit = "e0a95dfd547cc9c3ebaaba1a12c2afe4bf621ac5",
+ importpath = "github.com/cockroachdb/cockroach-go",
+)
+
+go_repository(
+ name = "com_github_jackc_pgx",
+ commit = "6954c15ad0bd3c9aa6dd1b190732b020379beb28",
+ importpath = "github.com/jackc/pgx",
+)
+
+go_repository(
name = "com_github_golang_collections_go_datastructures",
commit = "59788d5eb2591d3497ffb8fafed2f16fe00e7775",
importpath = "github.com/golang-collections/go-datastructures",