updating sql because of new tables