2Pack - mismatch NVARCHAR2 / VARCHAR2

26 views
Skip to first unread message

Nicolas Micoud

unread,
Aug 14, 2015, 6:27:58 AM8/14/15
to iDempiere
Hi,

I've started to test the migration of our ADempiere instance to iDempiere.
Most of our customizations have been migrated to iDempiere keeping same database structure.
To avoid conflicts (I used centralized ID on ADempiere, starting with 300000), I delete all the Application Dictionnary objets (AD_Element, AD_Table, ...) with an ID >= 300000 AND <999999.

Then I execute all migration scripts to update the database to v2.1
And now, I'm using 2Pack to transfer modules from our "main" iDempiere base to the newly migrated one.

And I'm facing issues because columns were created as NVARCHAR2 (remember https://idempiere.atlassian.net/browse/IDEMPIERE-1587 ?) and iDempiere is trying to update them using VARCHAR2.

But Oracle complains (as you can't change the datatype of a column when is not empty) and the import of 2Pack fails

I had to change a little the createColumn column of ColumnElementHandler to avoid those issues.

Don't know if it can be integrated in trunk, but you may find the little fix I use in attachment.



Regards,

Nicolas
Fix2PackMismatchNVARCHAR2_VARCHAR2.patch

Carlos Antonio Ruiz Gomez

unread,
Aug 14, 2015, 10:26:22 AM8/14/15
to idem...@googlegroups.com
Nicolas, that sounds the opposite to what we tried to fix on IDEMPIERE-1587.

Seems like a specific problem with your old DB, I would advise to make
the change temporarily, or maybe make your own ColumnElementHandler -
handlers are extensible, and 2pack indeed is a plugin. Or, you can try
changing your source DB to match the expected VARCHAR2 before migration.

Did I understand correctly?

Regards,

Carlos Ruiz

Nicolas Micoud

unread,
Aug 14, 2015, 11:05:22 AM8/14/15
to iDempiere
Hi Carlos,

The best would be to change the original db. But as there are lots of columns, i'd prefer to keep the old type.
But as it seems cleaner to do it this way, i will consider it.

Thanks,

Nicolas
Reply all
Reply to author
Forward
0 new messages