Fixed schema errors for mysql and sqlite