add trailing slash

This commit is contained in:
Erik Eckert 2023-09-27 16:59:49 -06:00
parent 3a8d1e0adf
commit 9a2adc0d68

View File

@ -189,13 +189,17 @@ CREATE TABLE "MigrationStatus" (
$MigrationStatus_import = Import-Excel -Path $PAth_To_Migration_Status -WorksheetName "MPE Migration Tracker" -StartRow 2
foreach ($status in $MigrationStatus_import) {
$SQLSourcePath = $status.'Source Path'.replace("'", "`'") #SQL Formatting
if ($SQLSourcePath -notmatch '\\$') {
$SQLSourcePath += '\'
}
$SQLDestPath = $status.'Destination Path'.replace("'", "`'") #SQL Formatting
if ($SQLDestPath -notmatch '\\$') {
$SQLDestPath += '\'
}
$SQLMigrationID = $status.'Migration ID'
$SQLMigrationName = $status.'Migration Name'
$SQLMigrationStatus = $status.'Current State'
# TODO Add code to ensure there's a trailing slash on Source and Dest paths (consistency)
$Query = "Select * from MigrationStatus WHERE MigrationID = `'$SQLMigrationID`'"
$Test = Invoke-SqliteQuery -DataSource $PathToDB -Query $Query