How to Mark Database Records as Deleted

Поділитися
Вставка
  • Опубліковано 21 січ 2025

КОМЕНТАРІ • 2

  • @uhuebner
    @uhuebner 6 місяців тому +2

    If you plan to reuse the ID (for whatever reasons) it's worth mentioning that you can do so by using a composite primary key on id and deleted_at.
    This way you won't get pk violations and you can be sure to have only _one_ active record with that id

    • @NeutronDev
      @NeutronDev  6 місяців тому +1

      That's a great suggestion!