Oh, I see. You're essentially just copying the old syncdb code here. Still, unless I'm missing something, the old code misbehaves.