CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
0049_account_deletion.sql
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| c63b860 | 1 | -- Block P5 — Account deletion with 30-day grace period. |
| 2 | -- Strictly additive. Soft-delete via `deleted_at` (sessions are cleared at | |
| 3 | -- schedule time, so the column alone is enough to keep the user out). The | |
| 4 | -- autopilot `account-purge` task hard-deletes rows whose | |
| 5 | -- `deletion_scheduled_for` is in the past. | |
| 6 | ||
| 7 | ALTER TABLE users | |
| 8 | ADD COLUMN IF NOT EXISTS deleted_at timestamptz, | |
| 9 | ADD COLUMN IF NOT EXISTS deletion_scheduled_for timestamptz; | |
| 10 | ||
| 11 | CREATE INDEX IF NOT EXISTS idx_users_deletion_scheduled | |
| 12 | ON users (deletion_scheduled_for) | |
| 13 | WHERE deletion_scheduled_for IS NOT NULL; |