fix spanner ensure migration table

This commit is contained in:
Watanabe Masaru 2017-06-24 16:46:57 +08:00 committed by Matthias Kadenbach
parent 88c6a0a752
commit 23a2745a3a
1 changed files with 1 additions and 1 deletions

View File

@ -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
} }