Closed (fixed)
Project:
Node Family
Version:
master
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
31 Oct 2006 at 17:28 UTC
Updated:
20 Nov 2006 at 16:30 UTC
Greetings,
Many thanks for your module. I'm using it together with other to achive profile nodes but I've found that installation doesn't support PostgreSQL. Here is the my patched installation file which is tested and works correctly with PostgreSQL:
// $Id: nodefamily.install,v 1.1 2006/08/09 09:34:49 fago Exp $
function nodefamily_install()
{
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
db_query("CREATE TABLE if not exists {nodefamily} (
parent_nid int(10) unsigned NOT NULL,
child_nid int(10) unsigned NOT NULL,
PRIMARY KEY(parent_nid,child_nid)
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;");
break;
case 'pgsql':
db_query("CREATE TABLE {nodefamily} (
parent_nid integer NOT NULL CHECK(parent_nid > 0),
child_nid integer NOT NULL CHECK(child_nid > 0),
PRIMARY KEY(parent_nid, child_nid)
)");
default:
break;
}
}
Please, consider to apply these changes for CVS version and 4.7 branch.
I didn't test all SQL querries from this modules but if I find any problems I'll report you immediate...
Thanks a lot !
Comments
Comment #1
fagothanks, for your report again.
I fixed all nodeprofile's module already for postgresql, but I used the int_unsigned datatype introduced by drupal 5.0. so now I just set the types to integer for the 4.7 branches.
Comment #2
ardas commentedOkay, thanks.
As I understood int_unsigned is an alias type because there is no such type in PostgreSQL...
I used CHECK(field_name > 0) as it was recomended on several sites .....
Comment #3
ardas commentedOh! here they are:
Nice that Drupal authors did so for Drupal 5.0 :)
Comment #4
(not verified) commented