added constraint for paths table and removed unused indices