mirror of https://github.com/status-im/migrate.git
fix spanner ensure migration table
This commit is contained in:
parent
88c6a0a752
commit
23a2745a3a
|
@ -258,7 +258,7 @@ func (s *Spanner) Drop() error {
|
||||||
func (s *Spanner) ensureVersionTable() error {
|
func (s *Spanner) ensureVersionTable() error {
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
tbl := s.config.MigrationsTable
|
tbl := s.config.MigrationsTable
|
||||||
iter := s.db.data.Single().Read(ctx, tbl, spanner.AllKeys(), nil)
|
iter := s.db.data.Single().Read(ctx, tbl, spanner.AllKeys(), []string{"Version"})
|
||||||
if err := iter.Do(func(r *spanner.Row) error { return nil }); err == nil {
|
if err := iter.Do(func(r *spanner.Row) error { return nil }); err == nil {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue