Skip to content

Commit 30e7017

Browse files
committed
Enable SQLCMD variable replacement in comments.
1 parent 05a02e6 commit 30e7017

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

PSql.Deploy.Engine/Migrations/MigrationLoader.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ private static IEnumerable<string> Preprocess(Migration migration)
121121

122122
var preprocessor = new SqlCmdPreprocessor
123123
{
124-
Variables = { ["Path"] = directoryPath }
124+
Variables = { ["Path"] = directoryPath },
125+
EnableVariableReplacementInComments = true,
125126
};
126127

127128
var raw = File.ReadAllText(migration.Path!);

PSql.Deploy.Engine/Seeds/SeedLoader.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ private static IEnumerable<string> Preprocess(Seed seed, Defines? defines = null
5353

5454
var preprocessor = new SqlCmdPreprocessor
5555
{
56-
Variables = { ["Path"] = directoryPath }
56+
Variables = { ["Path"] = directoryPath },
57+
EnableVariableReplacementInComments = true,
5758
};
5859

5960
if (defines is not null)

0 commit comments

Comments
 (0)