All tags / #database

#database

2 posts

Seeding Your Database the Idempotent Way

Peter Amiri

Wheels 4.0 ships a convention-based seeder built around seedOnce() — an idempotent helper that creates a record only if a matching one doesn't already exist, wrapped in a transaction that rolls the whole run back on any failure. This is the worked guide: file conventions, the CLI, composite uniqueness, and the sharp edges.

Migrations That Survive a Team: the Wheels 4.0 Migrator

Peter Amiri

A broad how-to on the Wheels 4.0 migrator: write up()/down() migrations, drive the TableDefinition column builder (including the three-column timestamps() and the columnNames-preferred helpers), seed with inline SQL, and run the migrate CLI — including the doctor/info/forget/pretend commands that keep a shared dev database honest.

Newsletter

Release notes and new posts, once a month. No spam.

Prefer RSS? Subscribe to the feed →