As of Go 1.16, the same functionality is now provided by package io or
package os, and those implementations should be preferred in new code.
So replacing all usage of ioutil pkg with io & os.
* used uber atomic bool instead standard in lock/unlock db
* fixing local lock optimization implementation
* fixing mysql local lock optimization implementation
* fixing cockroachdb local lock optimization implementation
* CAS wrapper to automatically restore
* added test for cas with restore
* added atomic lock to sqlite & mongo
* added atomic lock to sqlite & mongo
* fix/refactor test cas restore function
* disable lock for mongo
* mongo local lock before acquiring the db lock
Co-authored-by: a.prinkov <[email protected]>
This is a copy of the existing sqlite3 driver, except that it imports `_
"github.com/mutecomm/go-sqlcipher/v4"` as database driver. This allows
to use migrate with encrypted sqlite databases.