Skip to content

Commit

Permalink
Merge pull request #1429 from sbwalker/dev
Browse files Browse the repository at this point in the history
fix EF Core version value in upgrade scripts
  • Loading branch information
sbwalker authored Jun 1, 2021
2 parents 5a46d6b + c91b8e7 commit dc4e321
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Oqtane.Server/Migrations/Framework/MigrationUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static string BuildInsertScript(string MigrationId)
{
var query = "IF NOT EXISTS(SELECT 1 FROM __EFMigrationsHistory WHERE MigrationId = '" + MigrationId + "') ";
query += "INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedDate, AppliedVersion) ";
query += "VALUES('" + MigrationId + "', '5.0.0', SYSDATETIME(), '" + Constants.Version + "')";
query += "VALUES('" + MigrationId + "', '5.0.4', SYSDATETIME(), '" + Constants.Version + "')";
return query;
}

Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Server/Scripts/MigrateMaster.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.SchemaVersion
VALUES ('Master.01.00.00.00', '5.0.0', SYSDATETIME(), '{{Version}}')
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedDate, AppliedVersion)
SELECT REPLACE(REPLACE(ScriptName, 'Oqtane.Scripts.', ''), '.sql', '') As MigrationId,
ProductVersion = '5.0.0',
ProductVersion = '5.0.4',
AppliedDate = CONVERT(datetime2(7), Applied),
AppliedVersion = '{{Version}}'
FROM SchemaVersions
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Server/Scripts/MigrateTenant.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.SchemaVersion
VALUES ('Tenant.01.00.00.00', '5.0.0', SYSDATETIME(), '{{Version}}')
INSERT INTO __EFMigrationsHistory(MigrationId, ProductVersion, AppliedDate, AppliedVersion)
SELECT REPLACE(REPLACE(ScriptName, 'Oqtane.Scripts.', ''), '.sql', '') As MigrationId,
ProductVersion = '5.0.0',
ProductVersion = '5.0.4',
AppliedDate = CONVERT(datetime2(7), Applied),
AppliedVersion = '{{Version}}'
FROM SchemaVersions
Expand Down

0 comments on commit dc4e321

Please sign in to comment.