Our interview practice product grew a second format last night: the original one-way video flow for early careers, and a new live-style track for experienced hires and returners. Different question flow, different timings, different marking, same product.
The database change for all of it is migration 0053 , which is 312 bytes:
ALTER TABLE "interviews" ADD COLUMN "track" text DEFAULT 'early_careers' NOT NULL ; --> statement-breakpoint ALTER TABLE "interviews" ADD COLUMN "config" jsonb ; --> statement-breakpoint ALTER TABLE "interviews" ADD CONSTRAINT "interviews_track_valid" CHECK ( "interviews" . "track" IN ( 'early_careers' , 'experienced' ));
Enter fullscreen mode
Exit fullscreen mode
The backfill that is not there
DEFAULT ... NOT NULL on a populated table used to mean a full rewrite, so the folklore is still to add the column nullable, backfill in batches, then set NOT NULL .…