phpgroupware-developers
[Top][All Lists]
Advanced

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

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


From: Ralf Becker
Subject: Re: [Phpgroupware-developers] phpgwapi/setup scripts .. can table have a two field pk with both fields as nullable?
Date: Wed, 13 Aug 2003 16:47:29 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030626

In MySql Primary Keys are not allowed to be nullable. What about useing an odinary value of 0 instead of null. This would work.

Ralf

Brian Johnson wrote:
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'];
        }



_______________________________________________
Phpgroupware-developers mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/phpgroupware-developers


--
----------------------------------------------------------------------
Ralf Becker
digital ROCK, Becker & Macht GbR            Telefon +49 (631) 31657-51
Leibnizstraße 17                            Telefax +49 (631) 31657-52
D-67663 Kaiserslautern                 EMail address@hidden





reply via email to

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