feat(storage): add private backups bucket #75

Merged
raisondetredev merged 1 commit from refs/pull/75/head into main 2026-07-05 22:51:11 +02:00
raisondetredev commented 2026-07-05 22:50:10 +02:00 (Migrated from codeberg.org)

What

Adds a private, owner-scoped backups Storage bucket (100 MB/object) with the standard four storage.objects RLS policies gating on the {auth.uid()}/ folder prefix — the same recipe as pdf-sources / studyset-assets.

Why

Backs the client's new automatic account-backup feature (halkyon-learn feat/automatic-backups). Snapshots are produced and uploaded client-side with the user's own session, so this bucket plus its owner-scoped RLS is the only backend surface: no service role, no cron, no edge function. Nothing server-side ever reads a user's backups.

Deploy

Migration 20260705165453_create_backups_bucket.sql. Apply to the live project via the usual migration workflow; run get_advisors afterwards to confirm no RLS gap. Idempotent (ON CONFLICT DO NOTHING) and reversible (drop the bucket + policies).

Merge this before the halkyon-learn PR so the bucket exists when the app feature ships.

## What Adds a private, owner-scoped `backups` Storage bucket (100 MB/object) with the standard four `storage.objects` RLS policies gating on the `{auth.uid()}/` folder prefix — the same recipe as `pdf-sources` / `studyset-assets`. ## Why Backs the client's new automatic account-backup feature (halkyon-learn `feat/automatic-backups`). Snapshots are produced and uploaded **client-side** with the user's own session, so this bucket plus its owner-scoped RLS is the only backend surface: no service role, no cron, no edge function. Nothing server-side ever reads a user's backups. ## Deploy Migration `20260705165453_create_backups_bucket.sql`. Apply to the live project via the usual migration workflow; run `get_advisors` afterwards to confirm no RLS gap. Idempotent (`ON CONFLICT DO NOTHING`) and reversible (drop the bucket + policies). **Merge this before the halkyon-learn PR** so the bucket exists when the app feature ships.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
project-halkyon/halkyon-infra!75
No description provided.