The check I didn’t write
Before the final switch, the developer conducted a full rehearsal using a private preview deployment. This stage was designed to catch any "human-level" errors that automated hashes might miss. While the automated checks had been exhaustive, the rehearsal immediately revealed a glaring issue: the admin dashboard reported zero users, despite the database containing twenty.
The discrepancy was traced to a Row-Level Security (RLS) policy. The dashboard calculated the user count from a profiles table. This table had a security policy that allowed profile visibility only if the user had written a public review, which required a subquery into the reviews table. On the new database, the permissions were set such that signed-in users were blocked from reading the reviews table entirely. Postgres, following its strict security protocols, refused the subquery and returned zero results for the dashboard.
The developer realized that while their "fingerprint" had checked table-level permissions, it had completely ignored column-level permissions. In July, an administrator had locked down the reviews table by revoking access to the entire table and then painstakingly granting it back for 155 individual columns to protect sensitive data like booking confirmations.
This oversight led to a significant realization: "Identical" is not an absolute state between two databases; it is a reflection of the specific metrics chosen for comparison. The hashes were correct about everything they were asked to check, but they hadn’t been asked to check the columns. After identifying the 155 missing grants and broadening the comparison to include schemas, types, and storage settings, the two environments were finally, truly synchronized.
The switch
The final transition was an exercise in planned simplicity. With the structure verified and the bugs squashed, a final export of every table was performed as text and loaded into the new project. A final row-by-row comparison confirmed that all 34 tables were identical.
The switch itself required only a single code commit to update the site’s database proxy settings and the adjustment of two environment variables on Vercel. Because the original database remained untouched throughout the process, the developer maintained a "way back"—a fail-safe that would allow the site to be reverted to its original state within minutes if any unforeseen issues arose.
Post-migration checks confirmed the success of the move. Every sitemap page returned a 200 OK status, with titles, canonical links, and structured data remaining unchanged. For the first time since May, the contact form functioned correctly, and notifications were successfully delivered. By the time the switch was complete, no new data had been written to the old database, ensuring a perfect handoff.
The move from a managed, restricted environment to a self-owned infrastructure was more than a technical task; it was a reclamation of the site’s foundation. Through a combination of AI-assisted labor and rigorous manual verification, the developer transformed a "black box" backend into a transparent, deterministic, and fully understood system.
