Fix: Manual Tenancy Creation Now Works Reliably
Fix: Manual Tenancy Creation Now Works Reliably
Release: v0.1.52
What happened
Users who attempted to create a tenancy manually — by entering tenant details such as name, email address, and phone number directly into the platform — encountered an error that prevented the tenancy from being saved.
The underlying cause was a malformed database INSERT statement targeting the tenants table. The query was passing default as an explicit value for several optional columns (status, id_verification_status, id_verification_notes, id_verified_at, user_id, notes, archived_at, created_at, updated_at) rather than omitting those columns entirely and allowing the database to apply their defaults automatically. The database rejected the statement, and no tenant record was created.
Example of the failed query:
INSERT INTO "tenants" (
"id", "org_id", "name", "email", "phone",
"date_of_birth", "status", "id_verification_status",
"id_verification_notes", "id_verified_at", "user_id",
"notes", "archived_at", "created_at", "updated_at"
) VALUES (
$1, $2, $3, $4, $5,
default, default, default,
default, default, default,
default, default, default, default
) RETURNING "id"
What was fixed
The INSERT statement has been corrected so that optional columns with database-level defaults are excluded from the query when no explicit value is provided. The database now applies its own defaults for fields like status and timestamps, and the tenant record is created as expected.
Who is affected
Anyone using the manual tenancy creation flow — i.e. adding a property and its tenants without an automated import. Tenancies created via other methods were not affected.
What you should do
No action is required. The fix is live in v0.1.52. If you previously encountered this error, simply retry creating the tenancy manually and it will complete successfully.