Fixed faulty generated SQL database schemas