This repository was archived by the owner on Jun 28, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import (
1313 "github.com/mattes/migrate/database"
1414 "regexp"
1515 "strconv"
16+ "context"
1617)
1718
1819func init () {
@@ -142,7 +143,7 @@ func (c *CockroachDb) Close() error {
142143// Locking is done manually with a separate lock table. Implementing advisory locks in CRDB is being discussed
143144// See: https://github.com/cockroachdb/cockroach/issues/13546
144145func (c * CockroachDb ) Lock () error {
145- err := crdb .ExecuteTx (c .db , func (tx * sql.Tx ) error {
146+ err := crdb .ExecuteTx (context . Background (), c .db , nil , func (tx * sql.Tx ) error {
146147 aid , err := database .GenerateAdvisoryLockId (c .config .DatabaseName )
147148 if err != nil {
148149 return err
@@ -221,7 +222,7 @@ func (c *CockroachDb) Run(migration io.Reader) error {
221222}
222223
223224func (c * CockroachDb ) SetVersion (version int , dirty bool ) error {
224- return crdb .ExecuteTx (c .db , func (tx * sql.Tx ) error {
225+ return crdb .ExecuteTx (context . Background (), c .db , nil , func (tx * sql.Tx ) error {
225226 if _ , err := tx .Exec ( `TRUNCATE "` + c .config .MigrationsTable + `"` ); err != nil {
226227 return err
227228 }
You can’t perform that action at this time.
0 commit comments