· 1 min read
#028
My Coding Agent Removed Default Now from the table column
It is 15th July and I am using one of most capable coding model from Ollama Cloud.
I am performing changes which is to throw error when trying to create a duplicate book.
When I wen through my sql migration script, I realized there
ALTER TABLE "book" ALTER COLUMN "updated_at" DROP DEFAULT;
ALTER TABLE "book" ADD CONSTRAINT "book_name_author_unique" UNIQUE("name","author");
Derail + Confuse
Now I am confused and trying to ask the LLM and it trying to convice me this is the known common issue in DrizzleKit.

When I further debug and realized that it actually remove the .defaultNow() from my table schema and that’s why there is an additional DROP DEFAULT line.
Opportunity
Instead of blaming the AI Model or Coding Agent here, I am trying to ask myself what’s the opportunity here?
It’s the best time to set a rule for my coding agent so it does not make this mistake again in future.