From 0a5267604200f764b1cbdfbe6613231c9bfb566d Mon Sep 17 00:00:00 2001 From: Master Kwoth Date: Wed, 13 Sep 2017 08:12:07 +0200 Subject: [PATCH] possible fix for null migration error --- src/NadekoBot/Migrations/MigrationQueries.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NadekoBot/Migrations/MigrationQueries.cs b/src/NadekoBot/Migrations/MigrationQueries.cs index d89a1685..b0d8413a 100644 --- a/src/NadekoBot/Migrations/MigrationQueries.cs +++ b/src/NadekoBot/Migrations/MigrationQueries.cs @@ -36,7 +36,7 @@ INSERT INTO DiscordUser DROP TABLE DiscordUser_tmp;"; public static string TotalXp { get; } = @"UPDATE DiscordUser -SET TotalXp = (SELECT SUM(Xp) FROM UserXpStats WHERE UserId = DiscordUser.UserId)"; +SET TotalXp = ifnull((SELECT SUM(Xp) FROM UserXpStats WHERE UserId = DiscordUser.UserId), 0)"; } } \ No newline at end of file