Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.8.5

Bug #13608 Obsolete tables and sequences not dropped on updateDatabase()
Submitted: 2008-04-06 11:56 UTC Modified: 2008-11-17 06:33 UTC
From: hschletz Assigned: ifeghali
Status: Closed Package: MDB2_Schema (version 0.8.2)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2008-04-06 11:56 UTC] hschletz (Holger Schletz)
Description: ------------ When updateDatabase() is called on a database which contains tables that are not present in the new schema, these tables are expected to be dropped. Instead, they are left as is. Looking further at the code, I discovered that this also applies to sequences. The attached patch fixes both.

Comments

 [2008-11-15 14:15 UTC] ifeghali (Igor Feghali)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2008-11-17 05:54 UTC] yunosh (Jan Schneider)
I only noticed this in the changelog after the release. This is highly undesirable in many cases, at least regarding tables, e.g. if a database is not completely managed by MDB2_Schema, but also contains tables created externally. Can we please make this an option?
 [2008-11-17 06:33 UTC] ifeghali (Igor Feghali)
Hello Jan, I do agree with you but in fact dropping obsolete tables is the expected behavior of MDB2_Schema. Having a switch for that could be a good addition indeed. Can you please request it as a new feature, just to keep each thing on its own place ? Regards, Igor Feghali.