Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0009468Openbravo ERPY. DBSourceManagerpublic2009-06-15 11:482009-07-27 00:00
shuehner 
marvintm 
urgentcriticalhave not tried
closedfixed 
5
pi 
2.50MP3 
Core
No
0009468: pi update.database fails when processing tables ad_image_ and ad_attachment_
update.database failed with the following error message:

---snip---

SQL Command failed with: ERROR: length for type varchar must be at least 1
-- END
-- -----------------------------------------------------------------------
-- TABLE AD_ATTACHMENT_
-- -----------------------------------------------------------------------
CREATE TABLE AD_ATTACHMENT_
(
    AD_ATTACHMENT_ID VARCHAR(32) NOT NULL,
    AD_CLIENT_ID VARCHAR(32) NOT NULL,
    AD_ORG_ID VARCHAR(32) NOT NULL,
    ISACTIVE CHAR(1) DEFAULT 'Y' NOT NULL,
    CREATED TIMESTAMP DEFAULT now() NOT NULL,
    CREATEDBY VARCHAR(32) NOT NULL,
    UPDATED TIMESTAMP DEFAULT now() NOT NULL,
    UPDATEDBY VARCHAR(32) NOT NULL,
    AD_TABLE_ID VARCHAR(32) NOT NULL,
    RECORD_ID VARCHAR(32) NOT NULL,
    TITLE VARCHAR(60) NOT NULL,
    TEXT VARCHAR(2000),
    BINARYDATA VARCHAR(0),
    AD_DATATYPE_ID VARCHAR(32)
)
SQL Command failed with: ERROR: relation "ad_attachment_" does not exist
-- END
COMMENT ON COLUMN AD_ATTACHMENT_.TITLE IS '--OBTG:NVARCHAR--';
COMMENT ON COLUMN AD_ATTACHMENT_.TEXT IS '--OBTG:NVARCHAR--';
SQL Command failed with: ERROR: relation "ad_attachment_" does not exist
-- END
INSERT INTO AD_ATTACHMENT_ (AD_ATTACHMENT_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED
,UPDATEDBY,AD_TABLE_ID,RECORD_ID,TITLE,TEXT,BINARYDATA,AD_DATATYPE_ID) SELECT AD_ATTACHMENT_ID,AD_CLIE
NT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,AD_TABLE_ID,RECORD_ID,TITLE,TEXT,BINARYDA
TA,AD_DATATYPE_ID FROM AD_ATTACHMENT
SQL Command failed with: ERROR: relation "ad_attachment_" does not exist
-- END
INSERT INTO AD_ATTACHMENT (AD_ATTACHMENT_ID,AD_CLIENT_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,
UPDATEDBY,AD_TABLE_ID,RECORD_ID,TITLE,TEXT,BINARYDATA,AD_DATATYPE_ID) SELECT AD_ATTACHMENT_ID,AD_CLIEN
T_ID,AD_ORG_ID,ISACTIVE,CREATED,CREATEDBY,UPDATED,UPDATEDBY,AD_TABLE_ID,RECORD_ID,TITLE,TEXT,BINARYDAT
A,AD_DATATYPE_ID FROM AD_ATTACHMENT_
SQL Command failed with: ERROR: table "ad_attachment_" does not exist
-- END
-- -----------------------------------------------------------------------
-- TABLE AD_ATTACHMENT_
-- -----------------------------------------------------------------------
DROP TABLE AD_ATTACHMENT_ CASCADE
SQL Command failed with: ERROR: length for type varchar must be at least 1
-- END

---snip---

Same error directly later to ad_image_. Problem is ths column 'BINARYDATA VARCHAR(0)'.

This will likely break all MP1 -> MP2 upgrades.
Try to use update.database to update MP1 to MP2.
250MP3releasecandidate
Issue History
2009-06-15 11:48shuehnerNew Issue
2009-06-15 11:48shuehnerAssigned To => marvintm
2009-06-15 16:45hgbotCheckin
2009-06-15 16:45hgbotNote Added: 0017316
2009-06-15 16:45hgbotStatusnew => resolved
2009-06-15 16:45hgbotResolutionopen => fixed
2009-06-15 16:46hgbotCheckin
2009-06-15 16:46hgbotNote Added: 0017317
2009-06-15 16:46hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/6e85c489f283f774cce50d68fe1f3939d90303a6 [^]
2009-06-22 11:09psarobeFixed in Version => main
2009-07-21 16:24psarobeFixed in Versionmain => 2.50MP3
2009-07-21 16:26psarobeTag Attached: 250MP3releasecandidate
2009-07-26 21:36psarobeStatusresolved => closed
2009-07-27 00:00anonymoussf_bug_id0 => 2827485

Notes
(0017316)
hgbot   
2009-06-15 16:45   
Repository: dbsourcemanager
Revision: 338
Author: marvintm
Date: 2009-06-15 16:45:24 +0200 (Mon, 15 Jun 2009)

Fixed issue 9468. Update.database should no longer fail in PostgreSQL, when recreating tables containing BLOB columns.

---
U trunk/src/org/apache/ddlutils/platform/postgresql/PostgreSqlBuilder.java
U trunk/src/org/apache/ddlutils/platform/postgresql/PostgreSqlModelLoader.java
U trunk/src/org/apache/ddlutils/platform/postgresql/PostgreSqlPlatform.java
---

https://dev.openbravo.com/websvn/dbsourcemanager/?rev=338&sc=1 [^]
(0017317)
hgbot   
2009-06-15 16:46   
Repository: erp/devel/pi
Changeset: 6e85c489f283f774cce50d68fe1f3939d90303a6
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Jun 15 16:45:28 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/6e85c489f283f774cce50d68fe1f3939d90303a6 [^]

Fixed issue 9468. Update.database should no longer fail in PostgreSQL, when recreating tables containing BLOB columns.

---
M src-db/database/lib/dbsourcemanager.jar
---