From: gilberto d. s. a. <gs...@gm...> - 2014-01-20 17:32:26
|
I am reviewing tables, primary keys and other constraints i find that table has 3 constraints like this paste from table show. CONSTRAINT `stockcatproperties_ibfk_1`, CONSTRAINT `stockcatproperties_ibfk_2` and CONSTRAINT `stockcatproperties_ibfk_3` enforce same condition. Is this a mistake or i missing something? Thanks for your time. ################################################ weberp 4.11.2: table stockcatproperties, primary key and constraints -- -- Estrutura da tabela `stockcatproperties` -- CREATE TABLE IF NOT EXISTS `stockcatproperties` ( `stkcatpropid` int(11) NOT NULL AUTO_INCREMENT, `categoryid` char(6) NOT NULL, `label` text NOT NULL, `controltype` tinyint(4) NOT NULL DEFAULT '0', `defaultvalue` varchar(100) NOT NULL DEFAULT '''''', `maximumvalue` double NOT NULL DEFAULT '999999999', `reqatsalesorder` tinyint(4) NOT NULL DEFAULT '0', `minimumvalue` double NOT NULL DEFAULT '-999999999', `numericvalue` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`stkcatpropid`), KEY `categoryid` (`categoryid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; -- -- Restrições para a tabela `stockcatproperties` -- ALTER TABLE `stockcatproperties` ADD CONSTRAINT `stockcatproperties_ibfk_1` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`), ADD CONSTRAINT `stockcatproperties_ibfk_2` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`), ADD CONSTRAINT `stockcatproperties_ibfk_3` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`); ################################################ -- gilberto dos santos alves +55.11.98646-5049 sao paulo - sp - brasil |
From: Phil D. <ph...@lo...> - 2014-01-21 05:58:36
|
Yes that's a strange one - looks like a mistake - although the dump file is produced by mysqldump so must be a bug in that utility I guess. Phil Phil Daintree Logic Works Ltd - +64 (0)275 567890 http://www.logicworks.co.nz On 21/01/14 06:32, gilberto dos santos alves wrote: > I am reviewing tables, primary keys and other constraints i find that > table has 3 constraints like this paste from table show. > > CONSTRAINT `stockcatproperties_ibfk_1`, > CONSTRAINT `stockcatproperties_ibfk_2` and > CONSTRAINT `stockcatproperties_ibfk_3` enforce same condition. > > Is this a mistake or i missing something? > > Thanks for your time. > > > ################################################ > weberp 4.11.2: table stockcatproperties, primary key and constraints > -- > -- Estrutura da tabela `stockcatproperties` > -- > CREATE TABLE IF NOT EXISTS `stockcatproperties` ( > `stkcatpropid` int(11) NOT NULL AUTO_INCREMENT, > `categoryid` char(6) NOT NULL, > `label` text NOT NULL, > `controltype` tinyint(4) NOT NULL DEFAULT '0', > `defaultvalue` varchar(100) NOT NULL DEFAULT '''''', > `maximumvalue` double NOT NULL DEFAULT '999999999', > `reqatsalesorder` tinyint(4) NOT NULL DEFAULT '0', > `minimumvalue` double NOT NULL DEFAULT '-999999999', > `numericvalue` tinyint(4) NOT NULL DEFAULT '0', > PRIMARY KEY (`stkcatpropid`), > KEY `categoryid` (`categoryid`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; > -- > -- Restrições para a tabela `stockcatproperties` > -- > ALTER TABLE `stockcatproperties` > ADD CONSTRAINT `stockcatproperties_ibfk_1` FOREIGN KEY > (`categoryid`) REFERENCES `stockcategory` (`categoryid`), > ADD CONSTRAINT `stockcatproperties_ibfk_2` FOREIGN KEY > (`categoryid`) REFERENCES `stockcategory` (`categoryid`), > ADD CONSTRAINT `stockcatproperties_ibfk_3` FOREIGN KEY > (`categoryid`) REFERENCES `stockcategory` (`categoryid`); > > ################################################ > -- > gilberto dos santos alves > +55.11.98646-5049 > sao paulo - sp - brasil > > > > > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > > > _______________________________________________ > Web-erp-developers mailing list > Web...@li... > https://lists.sourceforge.net/lists/listinfo/web-erp-developers |
From: gilberto d. s. a. <gs...@gm...> - 2014-01-21 15:30:46
|
for those want remove not necessary constraints stockcatproperties_ibfk_2 of and stockcatproperties_ibfk_3 for table stockcatproperties these is sql for use: alter table stockcatproperties drop foreign key stockcatproperties_ibfk_2; alter table stockcatproperties drop foreign key stockcatproperties_ibfk_3; regards. 2014/1/21 Tim Schofield <tim...@gm...> > Phil, > > You brought in the extra constraints in your commit of 5695 on 6/10/2012. > It was probably a case that you had changed your local database for some > reason but hadn't cleaned it up before using the build script. > > I always found it useful to dump the local database I had, and create a > new one from the previous revision, apply any updates, and then run the > build script. It avoids these sort of errors creeping in. > > Such things slow the DB down a lot so more care should be taken. To think > you publicly accused me of trying to sabotage the project when I > accidentally committing an incorrect css class that would have been ignored > anyway!! No apology ever made for that one either I note :) > > Tim > > > On 21 January 2014 05:58, Phil Daintree <ph...@lo...> wrote: > >> Yes that's a strange one - looks like a mistake - although the dump >> file is produced by mysqldump so must be a bug in that utility I guess. >> >> Phil >> >> Phil Daintree >> Logic Works Ltd - +64 (0)275 567890http://www.logicworks.co.nz >> >> On 21/01/14 06:32, gilberto dos santos alves wrote: >> >> I am reviewing tables, primary keys and other constraints i find that >> table has 3 constraints like this paste from table show. >> >> CONSTRAINT `stockcatproperties_ibfk_1`, >> CONSTRAINT `stockcatproperties_ibfk_2` and >> CONSTRAINT `stockcatproperties_ibfk_3` enforce same condition. >> >> Is this a mistake or i missing something? >> >> Thanks for your time. >> >> >> ################################################ >> weberp 4.11.2: table stockcatproperties, primary key and constraints >> -- >> -- Estrutura da tabela `stockcatproperties` >> -- >> CREATE TABLE IF NOT EXISTS `stockcatproperties` ( >> `stkcatpropid` int(11) NOT NULL AUTO_INCREMENT, >> `categoryid` char(6) NOT NULL, >> `label` text NOT NULL, >> `controltype` tinyint(4) NOT NULL DEFAULT '0', >> `defaultvalue` varchar(100) NOT NULL DEFAULT '''''', >> `maximumvalue` double NOT NULL DEFAULT '999999999', >> `reqatsalesorder` tinyint(4) NOT NULL DEFAULT '0', >> `minimumvalue` double NOT NULL DEFAULT '-999999999', >> `numericvalue` tinyint(4) NOT NULL DEFAULT '0', >> PRIMARY KEY (`stkcatpropid`), >> KEY `categoryid` (`categoryid`) >> ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; >> -- >> -- Restrições para a tabela `stockcatproperties` >> -- >> ALTER TABLE `stockcatproperties` >> ADD CONSTRAINT `stockcatproperties_ibfk_1` FOREIGN KEY (`categoryid`) >> REFERENCES `stockcategory` (`categoryid`), >> ADD CONSTRAINT `stockcatproperties_ibfk_2` FOREIGN KEY (`categoryid`) >> REFERENCES `stockcategory` (`categoryid`), >> ADD CONSTRAINT `stockcatproperties_ibfk_3` FOREIGN KEY (`categoryid`) >> REFERENCES `stockcategory` (`categoryid`); >> >> ################################################ >> -- >> gilberto dos santos alves >> +55.11.98646-5049 >> sao paulo - sp - brasil >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> CenturyLink Cloud: The Leader in Enterprise Cloud Services. >> Learn Why More Businesses Are Choosing CenturyLink Cloud For >> Critical Workloads, Development Environments & Everything In Between. >> Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk >> >> >> >> _______________________________________________ >> Web-erp-developers mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> >> >> >> ------------------------------------------------------------------------------ >> CenturyLink Cloud: The Leader in Enterprise Cloud Services. >> Learn Why More Businesses Are Choosing CenturyLink Cloud For >> Critical Workloads, Development Environments & Everything In Between. >> Get a Quote or Start a Free Trial Today. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk >> _______________________________________________ >> Web-erp-developers mailing list >> Web...@li... >> https://lists.sourceforge.net/lists/listinfo/web-erp-developers >> >> > > > -- > Course View Towers, > Plot 21 Yusuf Lule Road, > Kampala > T +256 (0) 312 314 418 > M +256 (0) 752 963 325 > www.weberpafrica.com > Twitter: @TimSchofield2 > Blog: http://weberpafrica.blogspot.co.uk/ > -- gilberto dos santos alves +55.11.98646-5049 sao paulo - sp - brasil |