~/talk

Migrations secret powers ⚡

Talkat Django Day Copenhagen 2022 · on Friday, 2022-04-08· [django, databases]
links:none on file
slides:none on file

Django migrations can separate model state changes from database operations using SeparateDatabaseAndState to tell Django a model was removed while running optimized SQL to rename the existing table into the auto-generated many‑to‑many name. The workflow uses a blank migration with run_sql and RunPython (functions take apps and schema_editor and must use apps.get_model), often with noop for irreversibility. Watch for PostgreSQL atomicity limits, manually determine db_table names from migration files or model._meta.db_table, and prefer reversible steps when feasible.

AI-written summary · about

  1. 0:00Introduction
  2. 1:51Migrations overview
  3. 5:31Handling complex transitions
  4. 11:59Separate database and state
  5. 19:50Implementation details
  6. 21:44Advanced use cases
  7. 24:34Q&A session
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.