Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0004706Openbravo ERPY. DBSourceManagerpublic2008-08-25 17:292009-03-18 11:02
marvintm 
marvintm 
normalminoralways
closedfixed 
5
 
 
Core
No
0004706: DROP TABLE CASCADE statements cause DROP VIEW statements to fail
If a view depending on a table and that table have to be dropped when updating the database, there will be an error.

This error happens because the DROP TABLE statement containts a CASCADE clause, that in turn forces the database to drop the view. Afterwards, dbsourcemanager tries to delete the view, which causes the error, as the view no longer exists.

Simply remove a table and a dependant view from your database xml files, and perform a ant update.database
The solution will be to delete views before deleting tables, so that this problem doesn't happen.
dbsm_migrate
Issue History
2008-08-25 17:29marvintmNew Issue
2008-08-25 17:29marvintmAssigned To => marvintm
2008-08-25 17:30svnbotCheckin
2008-08-25 17:30svnbotNote Added: 0008731
2008-08-25 17:30svnbotStatusnew => resolved
2008-08-25 17:30svnbotResolutionopen => fixed
2008-08-25 17:30svnbotsvn_revision => 106
2008-12-15 19:05psarobeStatusresolved => closed
2008-12-18 12:38jpabloaeSticky IssueNo => Yes
2008-12-18 12:39jpabloaeSticky IssueYes => No
2008-12-18 12:39jpabloaeTag Attached: dbsm_migrate
2008-12-18 12:41jpabloaeProject@4@ => Openbravo ERP
2008-12-18 12:42jpabloaeCategory => Y. DBSourceManager
2009-03-18 11:02anonymoussf_bug_id0 => 2691341

Notes
(0008731)
svnbot   
2008-08-25 17:30   
Repository: dbsourcemanager
Revision: 106
Author: marvintm
Date: 2008-08-25 17:30:58 +0200 (Mon, 25 Aug 2008)

Fixed bug 0004706. Now views will be dropped before tables.

---
U branches/r0.8x/src/org/apache/ddlutils/platform/SqlBuilder.java
---

https://dev.openbravo.com/websvn/dbsourcemanager/?rev=106&sc=1 [^]