Skip to content

Commit

Permalink
Fix for migration table check in packages with prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov authored Mar 22, 2024
1 parent 402c958 commit 25dafcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/DataMigrationManager.R
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ DataMigrationManager <- R6::R6Class(
#' @return boolean
migrationTableExists = function() {
tables <- DatabaseConnector::getTableNames(private$connectionHandler$getConnection(), self$databaseSchema)
return(tolower(paste0(self$tablePrefix, "migration")) %in% tables)
return(tolower(paste0(self$tablePrefix, self$packageTablePrefix, "migration")) %in% tables)
},

#' Get path of migrations
Expand Down Expand Up @@ -307,7 +307,7 @@ DataMigrationManager <- R6::R6Class(
private$logInfo("Creating migrations table")
sql <- "
--HINT DISTRIBUTE ON RANDOM
CREATE TABLE @database_schema.@table_prefix@migration (
CREATE TABLE IF NOT EXISTS @database_schema.@table_prefix@migration (
migration_file VARCHAR PRIMARY KEY,
migration_order INT NOT NULL unique
);"
Expand Down

0 comments on commit 25dafcf

Please sign in to comment.