From dfff7295f15bd8196fe405fc387a7357e46f3ab6 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 25 Apr 2013 00:42:24 -0500 Subject: [PATCH] Database seeds - added support to import postgres 9.1 or higher (default) - and to import postgres 8.4 or 9.0 you can run RUN_ImportIdempiere.[bat|sh] 8.4 --- .../utils.unix/RUN_ImportIdempiere.sh | 11 +++++++++++ .../utils.windows/RUN_ImportIdempiere.bat | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/org.adempiere.server-feature/utils.unix/RUN_ImportIdempiere.sh b/org.adempiere.server-feature/utils.unix/RUN_ImportIdempiere.sh index a0aba2ff26..bf6bc79b86 100644 --- a/org.adempiere.server-feature/utils.unix/RUN_ImportIdempiere.sh +++ b/org.adempiere.server-feature/utils.unix/RUN_ImportIdempiere.sh @@ -16,6 +16,17 @@ then SYSUSER=postgres fi +# for oracle or postgres version 9.1 or higher you run this the usual way: +# RUN_ImportIdempiere.sh +# for postgres versions 8.4 or 9.0 you can run this way: +# RUN_ImportIdempiere.sh 8.4 +# or +# RUN_ImportIdempiere.sh 9.0 +if [ "x$1" = x8.4 -o "x$1" = x9.0 ] +then + SUFFIX="_pg84" +fi + echo Re-Create idempiere User and import $IDEMPIERE_HOME/data/Adempiere${SUFFIX}.dmp - \($ADEMPIERE_DB_NAME\) echo == The import will show warnings. This is OK == cd $IDEMPIERE_HOME/data/seed diff --git a/org.adempiere.server-feature/utils.windows/RUN_ImportIdempiere.bat b/org.adempiere.server-feature/utils.windows/RUN_ImportIdempiere.bat index 0ff35c123d..3c949cd6c5 100644 --- a/org.adempiere.server-feature/utils.windows/RUN_ImportIdempiere.bat +++ b/org.adempiere.server-feature/utils.windows/RUN_ImportIdempiere.bat @@ -8,6 +8,15 @@ SET SYSUSER=system if (%ADEMPIERE_DB_PATH%) == (postgresql) SET SUFFIX=_pg if (%ADEMPIERE_DB_PATH%) == (postgresql) SET SYSUSER=postgres +@Rem for oracle or postgres version 9.1 or higher you run this the usual way: +@Rem RUN_ImportIdempiere.sh +@Rem for postgres versions 8.4 or 9.0 you can run this way: +@Rem RUN_ImportIdempiere.sh 8.4 +@Rem or +@Rem RUN_ImportIdempiere.sh 9.0 +if (%1) == (8.4) SET SUFFIX=_pg84 +if (%1) == (9.0) SET SUFFIX=_pg84 + @echo Re-Create idempiere User and import %IDEMPIERE_HOME%\data\Adempiere.dmp - (%ADEMPIERE_DB_NAME%) cd %IDEMPIERE_HOME%\data\seed jar xvf Adempiere%SUFFIX%.jar