~/talk

rails db:migrate:even_safer

Talkat RailsConf 2021 · 2021-04-12..04-15· [databases]
slides:none on file

Covers concrete, battle‑tested techniques for live schema evolution: using ignored_columns workaround to avoid prepared statement cache failures, adding constraints with add_check_constraint ... not valid then validating to avoid access exclusive locks, a six‑step safe column‑type migration (new column, sync via triggers or callbacks, batched backfill, add indexes, swap, drop), and a Weedmaps case study replacing a table with sidekiq batches for backfill. Examples target Postgres and Rails (6.1+), show full rollout order, and report successful production execution.

AI-written summary · about

  1. 0:00Start
  2. 2:53Rails Db Migrate Safely
  3. 4:22Lock Modes
  4. 5:09Why these Migrations Can Be Dangerous
  5. 11:59Adding a Column Prepared Statements
  6. 19:51Adding a Check Constraint
  7. 21:27Add Check Constraint
  8. 26:03Triggers at the Database Level
  9. 27:28Callbacks
  10. 32:07Sanity Check
  11. 42:11Indexes Foreign Keys and Other Constraints
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.