Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Wrong metadata data types for PostgreSQL DB #12842
Method \Phalcon\Mvc\Model\MetaData::getDataTypes is returning wrong datatype for PostgreSQL database and column types double precision and real.
It is returning 2 which wrongly corresponding to \Phalcon\Db\Column ::TYPE_VARCHAR instead of respectively: \Phalcon\Db\Column::TYPE_DOUBLE for double precision and \Phalcon\Db\Column::TYPE_FLOAT for real.
Example dump of print_r of array returned by getDataTypes($model), where $model is subclass of \Phalcon\Mvc\Model:
Table structure dump from Postgresql version 9.5:
Directive => Local Value => Master Value
I dont know how to do pull request and I can't use Zephyr on windows.
Can you fix it? This is like 5 min job for someone who have Zephyr ready. You dont even need Postgresql for that.
here's list of datatypes:
Just do mapping for every type like:
bigint => ....
No, I have account at github because it's required by Phalcon Phorum, that's the only reason.
Sorry, but I doesn't understand why I don't need Zephyr - source code of Phalcon is written in Zephyr, so in order to fix it, I need to use Zephyr, right, or not?
I can fix it, just don't have time right now for it. What you mean how? Just by making PR.
Pretty simple and easy really. I will try to fix it, but not sure when, maybe will try to look into it on weekend.
Is this file responsible for mapping or im wrong:
Is it for annotations only? Where I can find mapping?
https://github.com/tztztztz/cphalcon/blob/master/phalcon/db/adapter/pdo/postgresql.zep this file most likely describeColumns method
referenced this issue
Jul 13, 2017
referenced this issue
Jul 18, 2017
Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues