mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 12:24:38 +03:00
Backup database if a migration is needed (#415)
* Confirm before migrating database Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
6
vendor/github.com/mattn/go-sqlite3/sqlite3_go18.go
generated
vendored
6
vendor/github.com/mattn/go-sqlite3/sqlite3_go18.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright (C) 2014 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
|
||||
// Copyright (C) 2019 Yasuhiro Matsumoto <mattn.jp@gmail.com>.
|
||||
//
|
||||
// Use of this source code is governed by an MIT-style
|
||||
// license that can be found in the LICENSE file.
|
||||
@@ -10,7 +10,6 @@ package sqlite3
|
||||
|
||||
import (
|
||||
"database/sql/driver"
|
||||
"errors"
|
||||
|
||||
"context"
|
||||
)
|
||||
@@ -18,7 +17,8 @@ import (
|
||||
// Ping implement Pinger.
|
||||
func (c *SQLiteConn) Ping(ctx context.Context) error {
|
||||
if c.db == nil {
|
||||
return errors.New("Connection was closed")
|
||||
// must be ErrBadConn for sql to close the database
|
||||
return driver.ErrBadConn
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user