Bad documentation of post_syncdb signal
|Reported by:||vzima||Owned by:||justinlilly|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Signal post_sycndb is badly documented:
- documentation says that created_models is list, but emit_post_sync_signal is called with set when it is called from syncdb command. Surprisingly it is called with set from flush command, so there is probably error in code as well.
- documentation suggests that post_syncdb signal is called only when table is created, so it looks like you can use it to change database structure (create contraints, triggers, ...) These SQL fail when yout post_sycndb handler is called from flush, because flush does not change database structure (except SQLs with 'IF NOT EXISTS'-like conditions). Documentation should noted that handlers of this signal should not change database structure and for such cases customize sql hack in syncdb should be used.
Change History (13)
comment:1 Changed 3 years ago by vzima
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:9 Changed 3 years ago by justinlilly
- Owner changed from nobody to justinlilly
- Status changed from new to assigned
comment:12 Changed 2 years ago by PaulM
- Resolution set to fixed
- Status changed from assigned to closed
Note: See TracTickets for help on using tickets.