From Legacy to Admin
summary
Demonstration shows django's inspectdb reverse engineers models from MySQL/Postgres, then builds a quick admin and small REST surface. It misidentifies many‑to‑many as three separate models, misses auto‑increment fields (fixed by swapping IntegerField for AutoField), and chokes on composite keys so a new id column is added (added id primary keys to composite‑key tables). Validation and a management command run cleanup; the postsync tool finds one bad profile (postsync found one bad row). Inspectdb output overwrites code and should run before syncdb.
AI-written summary · about
chapters (8)
- 0:00Start
- 7:45Primary Loops
- 11:28Inspect Db
- 12:46Related Name Collision
- 15:15Add a User
- 16:00Composite Primary Keys
- 20:11Management Command
- 20:38Post Sync
related talks
27mMigrating legacy data to your Django project
31mSpace Django: Migrating and Redesigning a Database while Hunting for Satellites.
31mThis Old Pony: Working With Legacy Django Apps
48mAuto-generating an API using PostgreSQL, Django, and Django REST Framework
24mDjango as a Database Documentation Tool: The Hidden Power... with Ryan Cheley
21mDjango's Migrations: A Retrospective
32mORM: The Sequel
57mDjangoCon 2008 Panel: Schema Evolution
