Skip to content

Commit

Permalink
Migrations: Don't let --output-dir override the existing snapshot loc…
Browse files Browse the repository at this point in the history
…ation

Note, --output-dir is still used to determine the directory on the first migration.

Fixes #13342
  • Loading branch information
bricelam committed Aug 25, 2020
1 parent ff60c29 commit 169296f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public virtual MigrationFiles Save(string projectDir, ScaffoldedMigration migrat
var migrationFile = Path.Combine(migrationDirectory, migration.MigrationId + migration.FileExtension);
var migrationMetadataFile = Path.Combine(migrationDirectory, migration.MigrationId + ".Designer" + migration.FileExtension);
var modelSnapshotFileName = migration.SnapshotName + migration.FileExtension;
var modelSnapshotDirectory = outputDir ?? GetDirectory(projectDir, modelSnapshotFileName, migration.SnapshotSubnamespace);
var modelSnapshotDirectory = GetDirectory(projectDir, modelSnapshotFileName, migration.SnapshotSubnamespace);
var modelSnapshotFile = Path.Combine(modelSnapshotDirectory, modelSnapshotFileName);

Dependencies.OperationReporter.WriteVerbose(DesignStrings.WritingMigration(migrationFile));
Expand Down

0 comments on commit 169296f

Please sign in to comment.