MySQL unique index constraint only when another column is null
I am trying to rewrite a Postgres schema to fit the MySQL (8.0.32) dialect. As you know, MySQL does not support partial indexes. In the following situation, there exists an index that enforces unique data on customer_group.name only when deleted_at…