Saltar al contenido
← volver

I stopped diffing my Go structs against the schema by hand. Now CI does it.

DEV · dev.to Publicado:

A while ago I wrote about a column that changed type 8 days after I mapped it. int NOT NULL became decimal(19,2) NULL, my hand-written struct still said int64, and nothing complained. The fix back then was to point a code generator at the live database and diff its output against what I had. That worked. It also had a weak spot I didn't want to admit: I had to remember to run it. The generator lived in an IDE plug-in and talked to the database over JDBC. Great on my machine, useless in a pipeli…

Leer original →

Más de DEV