View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
190 | Composr | core_database_drivers | public | 2010-07-14 17:17 | 2010-07-15 18:46 |
Reporter | Guest | Assigned To | Chris Graham | ||
Priority | normal | Severity | major | ||
Status | resolved | Resolution | fixed | ||
Summary | 190: Install fails on postgresql | ||||
Description | During install Unfortunately a query has failed [ALTER TABLE cms4_f_member_custom_fields ADD field_14 text NOT NULL] [ERROR: column "field_14" contains null values] | ||||
Additional Information | In sources/database_helper.php line 310 you have if ($_type!='LONG_TEXT') $extra=is_null($default)?'DEFAULT NULL':(' DEFAULT '.(is_string($default)?('\''.db_escape_string($default).'\''):strval($default))); The SQL postgresql needs is "ALTER TABLE cms4_f_member_custom_fields ADD field_14 text NOT NULL default ''" And if it were not for the if then the code would produce this. But it must be there for a reason... But removing the if and having the code run everytime is the fix for postgresql... | ||||
Tags | No tags attached. | ||||
Attach Tags | |||||
Time estimation (hours) | |||||
Sponsorship open | |||||
|
I think it must be that some DB's use blob's for the LONG_TEXT implementation and in those DB's the blob values don't allow default's. I've put in an '||' clause for postgresql in the file. A bit of an architectural issue, so we'll have to review the DB driver structure if we do end up doing a full compatibility review in the future. |