discourse/db
Ted Johansson 93625ef07c
FIX: Make problem check tracker unique constraint work on PG13 (#29272)
In #29169 we added a NULLS NOT DISTINCT option to the unique index on problem_check_trackers. This is to enforce uniqueness even when the target is NULL. (Postgres considers all NULLs to be distinct by default.)

However, this only works in PG15. In PG13 it does nothing.

This commit adds a default dummy string value __NULL__ to target. Since it's a string, PG13 will be able to correctly identify duplicate records.
2024-10-21 10:45:09 +08:00
..
fixtures DEV: remap all core icons for fontawesome 6 upgrade (#28715) 2024-09-13 16:50:52 +01:00
migrate FIX: Make problem check tracker unique constraint work on PG13 (#29272) 2024-10-21 10:45:09 +08:00
post_migrate DEV: Remove logical OR assignment of constants (#29201) 2024-10-16 10:09:07 +08:00
api_test_seeds.rb DEV: Apply syntax_tree formatting to db/* 2023-01-09 11:59:41 +00:00