Skip to content

Conversation

@fcostin
Copy link

@fcostin fcostin commented Apr 25, 2022

Refactor responsibility of setting the migration table name

Previously pkg/spanner Client API expected caller to explicitly
pass in the migration table name, except when doing a truncate
operation, where the migration table name was hardcoded and the
caller could not control it.

BEWARE: this commit introduces a breaking change to the Client
API and removes tableName. Instead, tableName can optionally
be set when a Client is created. See: pkg/spanner/config.go

Reworked cmd/ to use the new pkg/spanner API.

WHAT

  • rework pkg/spanner Client API not to require migration table name to be passed in each method call
  • make it possible to configure migration table name through pkg/spanner Config

WHY

see: #50

Refactor responsibility of setting the migration table name

Previously pkg/spanner Client API expected caller to explicitly
pass in the migration table name, except when doing a truncate
operation, where the migration table name was hardcoded and the
caller could not control it.

BEWARE: this commit introduces a breaking change to the Client
API and removes tableName. Instead, tableName can optionally
be set when a Client is created. See: pkg/spanner/config.go

Reworked cmd/ to use the new pkg/spanner API.
@fcostin
Copy link
Author

fcostin commented Apr 25, 2022

beware: i haven't figured out how to get the test suite to run against a spanner emulator on my local machine, so i cannot confirm the test suite is passing on this branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant