From 3ad5a6ab1ef53330f18014b710534d0ed0cd55b0 Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Sun, 18 Aug 2024 16:06:54 -0400 Subject: Fix using a schema with a custom migration table name (#7) * Fix using a schema with a custom migration table name * Fix test --- CHANGELOG.md | 6 ++++ README.md | 2 +- .../repositories/migration_db_repo_mssql_test.go | 38 ++++++++++++++++++++++ .../migration_db_repo_postgresql_test.go | 36 ++++++++++++++++++++ internal/storage/mssql.go | 18 +++++++--- internal/storage/postgresql.go | 20 ++++++++---- internal/storage/postgresql_test.go | 28 +++++++++++++++- 7 files changed, 135 insertions(+), 13 deletions(-) create mode 100644 internal/repositories/migration_db_repo_mssql_test.go create mode 100644 internal/repositories/migration_db_repo_postgresql_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 80280db..97b0b10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Using a database schema with a custom migration table (e.g. `my_schema.my_table`) would lead to the table attempting to get re-created each time bolt runs and failing because it already exists. + ## [0.10.0] - 2024-08-18 ### Added diff --git a/README.md b/README.md index f85a3d9..ea15e94 100644 --- a/README.md +++ b/README.md @@ -451,5 +451,5 @@ All migrations are created on the local filesystem in the format `_