fixed database refactoring for mysql (Invalid default value)