fixed schema.mysql and bad patches