Fix a backward compatibility problem

This commit is contained in:
Jesús Espino 2021-04-17 10:05:07 +02:00
parent 83375684af
commit d668bf6626

View file

@ -48,7 +48,7 @@ func (pm *PrefixedMigration) ReadUp(version uint) (io.ReadCloser, string, error)
if err != nil { if err != nil {
return nil, "", err return nil, "", err
} }
return io.NopCloser(bytes.NewReader(buffer.Bytes())), identifier, nil return ioutil.NopCloser(bytes.NewReader(buffer.Bytes())), identifier, nil
} }
func (pm *PrefixedMigration) ReadDown(version uint) (io.ReadCloser, string, error) { func (pm *PrefixedMigration) ReadDown(version uint) (io.ReadCloser, string, error) {
@ -69,7 +69,7 @@ func (pm *PrefixedMigration) ReadDown(version uint) (io.ReadCloser, string, erro
if err != nil { if err != nil {
return nil, "", err return nil, "", err
} }
return io.NopCloser(bytes.NewReader(buffer.Bytes())), identifier, nil return ioutil.NopCloser(bytes.NewReader(buffer.Bytes())), identifier, nil
} }
func (s *SQLStore) Migrate() error { func (s *SQLStore) Migrate() error {