add diagrams and update sql script