mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 06:57:39 +08:00
Run database migration unconditionally, remove downwards migration
This commit is contained in:
parent
710b0a4664
commit
eb9199e07a
@ -11,10 +11,6 @@ namespace osu.Game.Migrations
|
||||
string sanitized = Path.DirectorySeparatorChar.ToString();
|
||||
string standardized = "/";
|
||||
|
||||
// If we are not on Windows, no changes are needed.
|
||||
if (string.Equals(standardized, sanitized, StringComparison.Ordinal))
|
||||
return;
|
||||
|
||||
// Escaping \ does not seem to be needed.
|
||||
migrationBuilder.Sql($"UPDATE `BeatmapInfo` SET `Path` = REPLACE(`Path`, '{sanitized}', '{standardized}')");
|
||||
migrationBuilder.Sql($"UPDATE `BeatmapMetadata` SET `AudioFile` = REPLACE(`AudioFile`, '{sanitized}', '{standardized}')");
|
||||
@ -25,18 +21,6 @@ namespace osu.Game.Migrations
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
string sanitized = Path.DirectorySeparatorChar.ToString();
|
||||
string standardized = "/";
|
||||
|
||||
// If we are not on Windows, no changes are needed.
|
||||
if (string.Equals(standardized, sanitized, StringComparison.Ordinal))
|
||||
return;
|
||||
|
||||
migrationBuilder.Sql($"UPDATE `BeatmapInfo` SET `Path` = REPLACE(`Path`, '{standardized}', '{sanitized}')");
|
||||
migrationBuilder.Sql($"UPDATE `BeatmapMetadata` SET `AudioFile` = REPLACE(`AudioFile`, '{standardized}', '{sanitized}')");
|
||||
migrationBuilder.Sql($"UPDATE `BeatmapMetadata` SET `BackgroundFile` = REPLACE(`BackgroundFile`, '{standardized}', '{sanitized}')");
|
||||
migrationBuilder.Sql($"UPDATE `BeatmapSetFileInfo` SET `Filename` = REPLACE(`Filename`, '{standardized}', '{sanitized}')");
|
||||
migrationBuilder.Sql($"UPDATE `SkinFileInfo` SET `Filename` = REPLACE(`Filename`, '{standardized}', '{sanitized}')");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user