From 09aed5f42f6df71b42b445a9c719076e463373ae Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 4 Sep 2013 14:45:52 -0500 Subject: [PATCH] IDEMPIERE-1329 Images are being saved with EntityType=D --- .../oracle/201309041432_IDEMPIERE-1329.sql | 15 +++++++++++++++ .../postgresql/201309041432_IDEMPIERE-1329.sql | 12 ++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 migration/i1.0c-release/oracle/201309041432_IDEMPIERE-1329.sql create mode 100644 migration/i1.0c-release/postgresql/201309041432_IDEMPIERE-1329.sql diff --git a/migration/i1.0c-release/oracle/201309041432_IDEMPIERE-1329.sql b/migration/i1.0c-release/oracle/201309041432_IDEMPIERE-1329.sql new file mode 100644 index 0000000000..c33884d2ba --- /dev/null +++ b/migration/i1.0c-release/oracle/201309041432_IDEMPIERE-1329.sql @@ -0,0 +1,15 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Sep 4, 2013 2:23:31 PM COT +-- IDEMPIERE-1329 Images are being saved with EntityType=D +ALTER TABLE AD_Image MODIFY EntityType VARCHAR2(40) DEFAULT 'U' +; + +-- Sep 4, 2013 2:23:32 PM COT +UPDATE AD_Image SET EntityType='U' WHERE EntityType IS NULL OR (EntityType='D' AND AD_Image_ID>=1000000) +; + +SELECT register_migration_script('201309041432_IDEMPIERE-1329.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201309041432_IDEMPIERE-1329.sql b/migration/i1.0c-release/postgresql/201309041432_IDEMPIERE-1329.sql new file mode 100644 index 0000000000..d2a366ad7d --- /dev/null +++ b/migration/i1.0c-release/postgresql/201309041432_IDEMPIERE-1329.sql @@ -0,0 +1,12 @@ +-- Sep 4, 2013 2:23:31 PM COT +-- IDEMPIERE-1329 Images are being saved with EntityType=D +INSERT INTO t_alter_column values('ad_image','EntityType','VARCHAR(40)',null,'U') +; + +-- Sep 4, 2013 2:23:32 PM COT +UPDATE AD_Image SET EntityType='U' WHERE EntityType IS NULL OR (EntityType='D' AND AD_Image_ID>=1000000) +; + +SELECT register_migration_script('201309041432_IDEMPIERE-1329.sql') FROM dual +; +