def create_checkpoint_snapshot(cls, checkpoint): db_seq = checkpoint.get_current_sequence_id() cls.objects.create(seq=db_seq, seq_int=safe_force_seq_int(db_seq), checkpoint_id=checkpoint.checkpoint_id, date_updated=date.today())
def set_seq_int(apps, schema_editor): HistoricalPillowCheckpoint = apps.get_model('hqadmin', 'HistoricalPillowCheckpoint') for checkpoint in HistoricalPillowCheckpoint.objects.all(): checkpoint.seq_int = safe_force_seq_int(checkpoint.seq) checkpoint.save()