-- AlterTable ALTER TABLE "Todo" ADD COLUMN "completedAt" TIMESTAMP(3); -- Backfill: approximate the completion time for to-dos that were already -- marked done before this column existed. `updatedAt` is the closest -- signal available -- for an already-completed to-do, the last write to -- the row is often the completion toggle itself. UPDATE "Todo" SET "completedAt" = "updatedAt" WHERE "completed" = true;