Profile Picture

Seamless Migration Squashing for EF Core 6 Migration Bundles

August 22nd, 2022
Seamless Migration Squashing for EF Core 6 Migration Bundles

EF Core generates and stores a full snapshot of the database for every migration. For a large data model, like we have at Vesta (come join us!), every migration adds ~15k LOC. Over time, we end up with more migration than application code—in 10 months, we generated over 2 million(!) lines of migration code.

All these snapshots significantly impact compile time, and without configuration, makes interacting with the codebase more tedious and slower. These snapshots also aren’t useful—after enough time has passed, it becomes prohibitively difficult to actually revert N migrations back.

Ideally, we’d be able to “squash” old migrations into one, removing the old snapshots and migration logic while preserving the ability to spin up a fresh database. In the following, I’ll describe how we achieved this at Vesta.

Read More →

2022 Track Season Retrospective

August 17th, 2022
2022 Track Season Retrospective

Track has been the most constant part of my life these past few years—through job changes, moves, and a global pandemic, I’ve hit the track and competed. This year, my preseason started all the way back in September of last year, and I didn’t run my last race until the last day of July.

And I had a great season! I shaved two tenths off my wind-legal 100m (10.92->10.71) and more than a half second off my 200 (22.10->21.55)—these results, especially the 200, are well beyond my expectations for the year. I also managed to stay healthy during the competitive season (with one minor hamstring injury in October) for the first time in about a decade.

Read More →

Visualizing and Deleting Entity Hierarchies in EF Core

August 16th, 2022

At Vesta, we have a multi-tenant application where tenant data is logically separated in our Postgres instance by a tenant_id column on entity tables. As we’ve grown, we’ve had to delete some tenant data. Although I’ve done it manually a few times in psql, manually deleting rows is dangerous, so I decided to write a script to delete tenants for us.

We use EF Core for all of our database interactions at Vesta, so our entire database schema is represented in our DbContext. Because DbContexts contain entity metadata, I wrote the script against that data.

Read More →

Meet Report: 2022 Sunset Summer Classic

June 6th, 2022

I concluded my track season at the Sunset Summer Classic in Marietta this past weekend. Although I intended to race both the 100 and 200, the meet was gargantuan and extremely late: I didn’t run the 100 until 8:45 PM (I’m usually in bed before 8:30)! Since the 200 wasn’t likely to go off before 11 PM or so, I skipped it.

Read More →
Next →