File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ var migrationsFS embed.FS
3333
3434func NewInMemoryBackend (opts ... option ) * sqliteBackend {
3535 // Use a unique named in-memory database
36- dsn := fmt .Sprintf ("file:%s?mode=memory&cache=shared" , uuid .NewString ())
36+ dsn := fmt .Sprintf ("file:%s?mode=memory&cache=shared&_txlock=immediate " , uuid .NewString ())
3737 b := newSqliteBackend (dsn , opts ... )
3838
3939 b .db .SetConnMaxIdleTime (0 )
@@ -52,7 +52,7 @@ func NewInMemoryBackend(opts ...option) *sqliteBackend {
5252}
5353
5454func NewSqliteBackend (path string , opts ... option ) * sqliteBackend {
55- return newSqliteBackend (fmt .Sprintf ("file:%v" , path ), opts ... )
55+ return newSqliteBackend (fmt .Sprintf ("file:%v?_txlock=immediate " , path ), opts ... )
5656}
5757
5858func newSqliteBackend (dsn string , opts ... option ) * sqliteBackend {
You can’t perform that action at this time.
0 commit comments