From: Stins, D. <DR...@Zi...> - 2004-02-24 22:13:54
|
Phil, Dropping the tables is not the problem. MySql just drops it without any warning!!! I expect that it also does not function for an empty database. For the dataload it is too dangerous to turn foreign key checks off, because I am afraid that you might to be able to load data which is not validated by the foreign key constraints. With best regards, Dick Stins ----- Original Message ----- From: "Phil Daintree" <ph...@du...> To: "Web ERP Developers" <Web...@li...> Sent: Tuesday, February 24, 2004 10:42 PM Subject: Re: [Web-erp-developers] create demo script > BlankYes I saw that. I thought the upgrade script would work for those that > already had a weberp db. Running the web_erp_demo.sql would hit snags > naturally in deleting the tables where there are foreign key constraints in > other tables. The upgrade script would not have a problem with this. > > What I haven't tried is running the script when a previous version of the db > is not already existing, does this fail too? > > Loading the demo data from scratch with the web_erp_demo.sql should probably > have the disable foreign key checks option in like you say - I will modify > this. > > P > ----- Original Message ----- > From: Stins, Dick > To: web...@li... > Sent: Wednesday, February 25, 2004 10:18 AM > Subject: [Web-erp-developers] create demo script > > > Hoi, > > I tried to setup a new demo database. > > The foreign keys are causing some trouble. > > Although I think we should not use the next statement, it is a quick > workaround to add to the script: > > mysql> SET FOREIGN_KEY_CHECKS = 0; > mysql> SOURCE dump_file_name; > mysql> SET FOREIGN_KEY_CHECKS = 1; > To be in control, we should deliver a script which does > not need this workaround. > See also: > http://www.mysql.com/doc/en/InnoDB_foreign_key_constraints.html > The load of the demo data is also complaining about the foreign key > constraints. > > The workaround works too, but there is a chance that the data integrity > is corrupted, because I suppose that mysql does not check the data integrity > (foreign keys) when the foreign keys are enabled. > > To be sure, we should improve the script with the ability to load the > (demo) data without any problems while the foreign key checks are enabled. > > With best regards, > > Dick Stins > |