cloudspannerecosystem / wrench

wrench - Schema management tool for Cloud Spanner -
MIT License
239 stars 46 forks source link

pkg/spanner - breaking - remove migration tableName parameter from API #51

Open fcostin opened 2 years ago

fcostin commented 2 years ago

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

WHY

see: https://github.com/cloudspannerecosystem/wrench/issues/50

fcostin commented 2 years ago

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