fix bug with saving best rank (lower rank should be better)
This commit is contained in:
parent
f53d427bf7
commit
5c069c919f
|
@ -111,7 +111,7 @@ const (
|
|||
NEW.most_villages = NEW.total_villages;
|
||||
NEW.most_villages_at = now();
|
||||
END IF;
|
||||
IF NEW.best_rank IS null OR NEW.rank > NEW.best_rank THEN
|
||||
IF NEW.best_rank IS null OR NEW.rank < NEW.best_rank THEN
|
||||
NEW.best_rank = NEW.rank;
|
||||
NEW.best_rank_at = now();
|
||||
END IF;
|
||||
|
@ -133,7 +133,7 @@ const (
|
|||
NEW.most_villages = NEW.total_villages;
|
||||
NEW.most_villages_at = now();
|
||||
END IF;
|
||||
IF NEW.best_rank IS null OR NEW.rank > OLD.best_rank THEN
|
||||
IF NEW.best_rank IS null OR NEW.rank < OLD.best_rank THEN
|
||||
NEW.best_rank = NEW.rank;
|
||||
NEW.best_rank_at = now();
|
||||
END IF;
|
||||
|
|
Reference in New Issue