'Cleanup after repository deletion
@todo: use standard delete cascade'

@staticmethod
def sync_repository_ondelete(row):

    db = current.db
    s3db = current.s3db
    rtable = s3db.sync_repository
    db((rtable.id == row.id)).update(url=None)
    ttable = s3db.sync_task
    db((ttable.repository_id == row.id)).update(deleted=True)
    jtable = s3db.sync_job
    db((jtable.repository_id == row.id)).update(deleted=True)
    ltable = s3db.sync_log
    db((ltable.repository_id == row.id)).delete()
    return
