db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

Soft delete

Soft delete keeps the row and marks it. A plain UNIQUE then blocks reusing the value, so the rule must cover live rows only.

task

Mark product 1 deleted (set deleted_at) and make sku unique only among live products (deleted_at IS NULL), so product 1's sku can be reused.

hints