Skip to content

Commit

Permalink
Fixes apply full schema snapshot (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbans96 authored Sep 25, 2020
1 parent cd31949 commit 7573aba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tools/SchemaManager/Commands/ApplyCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ await Policy.Handle<SchemaManagerException>()
{
await ValidateVersionCompatibility(schemaClient, availableVersions.Last().Id);
}
else if (availableVersions.First().Id == 1)

if (availableVersions.First().Id == 1)
{
// Upgrade schema directly to the latest schema version
Console.WriteLine(string.Format(Resources.SchemaMigrationStartedMessage, availableVersions.Last().Id));
Expand Down
6 changes: 1 addition & 5 deletions tools/SchemaManager/SchemaDataStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ public static void ExecuteScriptAndCompleteSchemaVersion(string connectionString

serverConnection.BeginTransaction();

// Since version 3 is just the base schema which must already be executed at the start of apply command and can be skipped
if (version != 3)
{
server.ConnectionContext.ExecuteNonQuery(script);
}
server.ConnectionContext.ExecuteNonQuery(script);

UpsertSchemaVersion(connection, version, Completed);

Expand Down

0 comments on commit 7573aba

Please sign in to comment.