fix logical schema to match sql scripts