Skip to content

Commit

Permalink
Merge pull request #298 from bdach/fix-bad-prod-check
Browse files Browse the repository at this point in the history
Fix faulty production check in database test setup
  • Loading branch information
smoogipoo authored Nov 18, 2024
2 parents f1a3f2d + 74786b3 commit 14c7ad9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected DatabaseTest(AssemblyName[]? externalProcessorAssemblies = null)
{
// just a safety measure for now to ensure we don't hit production. since i was running on production until now.
// will throw if not on test database.
if (db.QueryFirstOrDefault<int?>("SELECT * FROM osu_counts WHERE name = 'is_production'") != null)
if (db.QueryFirstOrDefault<int?>("SELECT `count` FROM `osu_counts` WHERE `name` = 'is_production'") != null)
throw new InvalidOperationException("You are trying to do something very silly.");

db.Execute("TRUNCATE TABLE osu_user_stats");
Expand Down

0 comments on commit 14c7ad9

Please sign in to comment.