Unlock implements the Locker interface to release the global lock after the migrations are run.
(ctx context.Context, tx Queryer, tableName string)
| 29 | // Unlock implements the Locker interface to release the global lock after the |
| 30 | // migrations are run. |
| 31 | func (p postgresDialect) Unlock(ctx context.Context, tx Queryer, tableName string) error { |
| 32 | lockID := p.advisoryLockID(tableName) |
| 33 | query := fmt.Sprintf("SELECT pg_advisory_unlock(%s)", lockID) |
| 34 | _, err := tx.ExecContext(ctx, query) |
| 35 | return err |
| 36 | } |
| 37 | |
| 38 | // CreateMigrationsTable implements the Dialect interface to create the |
| 39 | // table which tracks applied migrations. It only creates the table if it |
nothing calls this directly
no test coverage detected