Add parent_id to tables