Skip to content

Add lesson: deleting rows and row lifecycle#15

Merged
exekias merged 1 commit into
mainfrom
lesson/06-delete-and-lifecycle
May 28, 2026
Merged

Add lesson: deleting rows and row lifecycle#15
exekias merged 1 commit into
mainfrom
lesson/06-delete-and-lifecycle

Conversation

@exekias
Copy link
Copy Markdown
Member

@exekias exekias commented May 28, 2026

Summary

  • New Module 2 lesson 06-delete-and-lifecycle (module-relative 02-delete-and-lifecycle).
  • Covers DELETE with predicates and RETURNING, foreign-key interactions (ON DELETE CASCADE / SET NULL / NO ACTION), TRUNCATE semantics (no WHERE, transactional, RESTART IDENTITY), and the soft-delete pattern with deleted_at timestamptz.
  • Three checks: a hard delete, a TRUNCATE, and a soft delete via UPDATE.

Part of #6.

Test plan

  • npm run lessons:validate
  • npx tsc --noEmit
  • npm run lint
  • Manual: walk through the lesson in /lessons/06-delete-and-lifecycle/preview and verify each <Run> works against the seed

🤖 Generated with Claude Code

Covers DELETE with predicates and RETURNING, foreign-key
interactions, TRUNCATE (including RESTART IDENTITY), and the
soft-delete pattern that most production apps actually use.

Part of #6.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
learn-postgres Ready Ready Preview May 28, 2026 2:47pm

@exekias exekias merged commit 7b61bee into main May 28, 2026
3 checks passed
@exekias exekias deleted the lesson/06-delete-and-lifecycle branch May 28, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant