phpgroupware-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-developers] phpgwapi/setup scripts .. can table have a two


From: Brian Johnson
Subject: [Phpgroupware-developers] phpgwapi/setup scripts .. can table have a two field pk with both fields as nullable?
Date: Wed, 13 Aug 2003 13:47:09 +0000

Need to check whether this will work with the supported dbs .. can someone 
please
confirm.

Want to allow both fields to be nullable so valid keys include
1,1
1,2
2,1
2,2
,1
,2
1,
2,
,  (this one won't be needed)


        $test[] = '0.9.14.508.004';
        function phpgwapi_upgrade0_9_14_508_004()
        {
                
$GLOBALS['phpgw_setup']->oProc->CreateTable('phpgw_contact_org_person',array(
                        'fd' => array(
                                'org_id' => array('type' => 'int','precision' 
=> '4','nullable' => True),
                                'person_id' => array('type' => 
'int','precision' => '4','nullable' => True),
                                'addr_id' => array('type' => 'int','precision' 
=> '4','nullable' => True),
                                'created_on' => array('type' => 
'int','precision' => '4','nullable' => False),
                                'created_by' => array('type' => 
'int','precision' => '4','nullable' => False)
                        ),
                        'pk' => array('org_id','person_id'),
                        'fk' => array(),
                        'ix' => array(),
                        'uc' => array()
                ));


                $GLOBALS['setup_info']['phpgwapi']['currentver'] = 
'0.9.14.508.005';
                return $GLOBALS['setup_info']['phpgwapi']['currentver'];
        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]