feature(spanner): Implement DML Support for Spanner#1197
feature(spanner): Implement DML Support for Spanner#1197jtwatson wants to merge 6 commits intogolang-migrate:masterfrom
Conversation
c60aa87 to
be12225
Compare
|
This PR supersedes the following PR #733, #910, #924 It is a robust implementation that greatly improves support for Spanner migrations. It also fixes a lot of open issues with the existing DDL parsing implementation. NOTE: Not sure why tests are failing, but it is not related to spanner tests. It looks like cockroachdb is having an issue. |
|
FYI: Now memefish has official release, so you don't need to use |
|
@dhui |
ed3767b to
07e9f94
Compare
|
Hello, any update on this feature ? |
|
Will you please take a look at this PR? It has been well tested and is in production use, so would be nice to get it merged! |
|
@dhui googleapis/google-cloud-go#11941 spansql package is
Almost all of the issues with Spanner in golang-migrate are caused by spansql. What is the reason for not responding to this PR? |
07e9f94 to
dd4885a
Compare
|
Rebased onto master branch and all tests look good. I would love to get a review on this! |
database/spanner/examples/migrations2/1481574547_create_users_table.down.sql
Outdated
Show resolved
Hide resolved
548bc4c to
4819a3a
Compare
4819a3a to
85cce1e
Compare
|
Rebased onto master branch and all tests look good. I would love to get a review on this! |
85cce1e to
810ea7e
Compare
|
@dhui @Fontinalis I am planning to fork this lib and go in a different direction. If you happen to see this and want to help, please reach out. It would be much better if we kept our efforts focused rather than fragmenting. |
|
@dhui |
Closes #135
Closes #775
Closes #918
Closes #1194
Supersedes the following PRs #733, #910, #924, #1287
This PR implements DML support and uses the
memefishlexer to parse the migrations, replacing the usage of thespansqlpackage. As a result, numerous otherspansqlrelated issues have been resolved.The following features have been implemented:
To maintain backward compatibility, the
x-clean-statementsoption must be used to enable the above features.This PR also fixes a bug where a provided spanner client via
WithInstance()is closed whenMigration.Close()is called. According to Docs, the caller is responsible for closing the underlying database client. This fix brings the Spanner driver into compliance with the expected behavior.I am maintaining a fork with this fix for those who would like to use it.
Put the following replace directive you your projects
go.mod