Commit Graph

2 Commits

Author SHA1 Message Date
Víctor Falcón ecd1a07a0b fix(spaces): resolve inviter name without a non-null relation assumption
Larastan treats the invitedBy belongsTo as always present, so the nullsafe
access read as unnecessary. Resolve the inviter name via a scalar query keyed on
the nullable invited_by_id instead — correct when the inviter's account was
deleted (nullOnDelete) and Larastan-clean. Drops the unused invitation view key.
2026-07-09 12:48:01 +02:00
Víctor Falcón c541dfc104 feat(spaces): add Space model, schema and backfill foundation
Introduce the multi-tenant Space concept without changing any behaviour yet:
every user gets an invisible personal space provisioned on creation, and all
owned models (accounts, connections, transactions, categories, labels, budgets,
automation rules, saved filters) gain a nullable space_id stamped via a
BelongsToSpace trait. An idempotent, chunked spaces:backfill command (run from a
migration) stamps existing rows so space-scoped reads can go live safely.
2026-07-06 16:32:41 +02:00