We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phalcon 3.0.1
If setting default value 0 for integer column, phalcon escapes it as string and postgres complains as column "0" not exists.
Change its behavior in https://github.com/phalcon/cphalcon/blob/master/phalcon/db/dialect/postgresql.zep#L382
Just add check - if INTEGER so not escape value. Phalcon already has check for BOOLEAN
if column->hasDefault() { let defaultValue = column->getDefault(); if memstr(strtoupper(columnDefinition), "BOOLEAN") { let sql .= " DEFAULT " . (defaultValue ? "true" : "false"); } elseif memstr(strtoupper(defaultValue), "CURRENT_TIMESTAMP") { let columnLine .= " DEFAULT CURRENT_TIMESTAMP"; } else { let columnLine .= " DEFAULT \"" . addcslashes(defaultValue, "\"") . "\""; } }
The text was updated successfully, but these errors were encountered:
Refs: phalcon/phalcon-devtools#859 I'll fix it ASAP.
Sorry, something went wrong.
Fixed. You have to update Phalcon from the 3.0.x branch:
3.0.x
git clone git@github.com:phalcon/cphalcon.git cd cphalcon git checkout 3.0.x zephir fullclean zephir build
Thank you for contributing!
sergeyklay
No branches or pull requests
Phalcon 3.0.1
If setting default value 0 for integer column, phalcon escapes it as string and postgres complains as column "0" not exists.
Change its behavior in https://github.com/phalcon/cphalcon/blob/master/phalcon/db/dialect/postgresql.zep#L382
Just add check - if INTEGER so not escape value. Phalcon already has check for BOOLEAN
The text was updated successfully, but these errors were encountered: