Modify

Ticket #172 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

Send signals indicating change on model

Reported by: Robert <trebor74hr@…> Owned by: andrew
Priority: major Milestone: 0.7
Component: migrations Version: 0.6-pre
Keywords: Cc:

Description

Django syncdb sends post-syncdb signal after syncdb. Ticket #171 tries to explain distinction with south post-syncdb (and asks for better documentation).

It would be useful that south sends its own (new) signals indicating that migrate is done, and/or some change on model is done. I suggest at least 2 signals:

  • south migration MM on application AA ended (after commit)
  • south changed model MD by the migration MM in application AA (after commit)

For initializing creating new table maybe post-syncdb can be (re)used or maybe new one should be defined.

On production system every change to existing model (e.g. alter table, drop column, drop table) is very sensitive operation, and sometimes it needs some post processing. In order to automate this as much as possible, we could use some signals. Then the logic triggered by the signals will be common for all kind of migrations .

Other possible usage is that if someone switched from django.syncdb to south.migrate philosophy then all logic that is connected to processing post-syncdb signal should be rewritten to support south philosophy (see also http://south.aeracode.org/ticket/170#comment:1).

References:

Attachments

Change History

comment:1 Changed 5 years ago by andrew

  • Status changed from new to assigned
  • Version set to subversion
  • Milestone set to 0.6

Yes, I like this idea.

comment:2 Changed 5 years ago by andrew

  • Milestone changed from 0.6 to 0.7

Bumping to 0.7 - the pre_migrate and post_migrate signals are in and working, but ran_migration needs the refactoring of migrations to happen first.

comment:3 Changed 4 years ago by andrew

  • Status changed from assigned to closed
  • Resolution set to fixed

South trunk now sends the ran_migration signal; closing.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.