TG

UUIDv7 across the board, a Mongo to Postgres migration, and Lighthouse CI

Settled on UUIDv7 for a client schema and matched local Postgres to prod, migrated an event product from MongoDB to PostgreSQL, and added Lighthouse CI plus perf tooling to a client site.

The busiest day of the stretch, and almost all of it circled one theme: getting the database layer honest.

Client project (NDA)

I reviewed a schema PR and cut every reference to external city codes, landing on clean estado and municipio tables keyed by UUIDv7. Those tables are read-only reference data, so no CRUD in the app, maybe an ativo flag later if something changes. That raised a concrete question: does Drizzle support UUIDv7, and how do I get my local Docker Postgres to generate it? The answer was to match the exact Postgres image production runs (18.4), so local and prod behave the same instead of drifting. I also consolidated the product docs, added mermaid diagrams and a roles-and-permissions spec, and worked through the harder domain modeling: one pilot per activity, technicians and support, activity plans with their own execution dates, and the tricky case of ownership transfer without dragging a farm's report history to the new owner.

iTOP

I ran a full MongoDB to PostgreSQL migration on the event-registration product. That meant converting the Prisma schema, swapping Mongo for Postgres 18.4 in Docker, fixing foreign-key deletes and JSON null handling, moving the test suite and CI onto real Postgres, and settling on UUIDv7 here too. The plan was deliberate: build the new structure locally with generated fake data and test it end to end first, then migrate real data in a later step.

CSM

On a client site, I added Lighthouse CI along with HTML and link checks and image optimization with Sharp, so quality stops being a manual spot-check. I also moved Google Analytics out of the head so it loads after interaction or a short delay, to protect the initial render.

tgmarinho-ai-website

I published a UUIDv4 vs UUIDv7 post, which was the natural writeup of the day's schema decision. I also drafted one on rolling your own JWT versus using a service, and started one on storing money in a database (why Decimal, ISO-4217 currency codes, and why not floats).

The thread through all of it: pick the primitive that ages well, then make every environment agree on it.