From 90a3d7aa68b56eaf439e056049834d0d016bcf81 Mon Sep 17 00:00:00 2001 From: Benjamin Gamard Date: Sat, 31 Mar 2018 22:53:49 +0200 Subject: [PATCH] add missing index --- .../com/sismics/util/EnvironmentUtil.java | 28 +++++++++---------- .../src/main/resources/config.properties | 2 +- .../resources/db/update/dbupdate-019-0.sql | 2 ++ docs-web/src/dev/resources/config.properties | 2 +- docs-web/src/prod/resources/config.properties | 2 +- .../src/stress/resources/config.properties | 2 +- 6 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 docs-core/src/main/resources/db/update/dbupdate-019-0.sql diff --git a/docs-core/src/main/java/com/sismics/util/EnvironmentUtil.java b/docs-core/src/main/java/com/sismics/util/EnvironmentUtil.java index 71daf9ec..55f4f9a8 100644 --- a/docs-core/src/main/java/com/sismics/util/EnvironmentUtil.java +++ b/docs-core/src/main/java/com/sismics/util/EnvironmentUtil.java @@ -3,28 +3,28 @@ package com.sismics.util; /** * Environment properties utilities. * - * @author jtremeaux + * @author jtremeaux */ public class EnvironmentUtil { private static String OS = System.getProperty("os.name").toLowerCase(); - + private static String APPLICATION_MODE = System.getProperty("application.mode"); private static String WINDOWS_APPDATA = System.getenv("APPDATA"); private static String MAC_OS_USER_HOME = System.getProperty("user.home"); - + private static String DOCS_HOME = System.getProperty("docs.home"); /** * In a web application context. */ private static boolean webappContext; - + /** * Returns true if running under Microsoft Windows. - * + * * @return Running under Microsoft Windows */ public static boolean isWindows() { @@ -33,7 +33,7 @@ public class EnvironmentUtil { /** * Returns true if running under Mac OS. - * + * * @return Running under Mac OS */ public static boolean isMacOs() { @@ -42,20 +42,20 @@ public class EnvironmentUtil { /** * Returns true if running under UNIX. - * + * * @return Running under UNIX */ public static boolean isUnix() { return OS.contains("nix") || OS.contains("nux") || OS.contains("aix"); } - + /** * Returns true if we are in a unit testing environment. - * + * * @return Unit testing environment */ public static boolean isUnitTest() { - return !webappContext || isDevMode(); + return !webappContext; } /** @@ -66,10 +66,10 @@ public class EnvironmentUtil { public static boolean isDevMode() { return "dev".equalsIgnoreCase(APPLICATION_MODE); } - + /** * Returns the MS Windows AppData directory of this user. - * + * * @return AppData directory */ public static String getWindowsAppData() { @@ -78,7 +78,7 @@ public class EnvironmentUtil { /** * Returns the Mac OS home directory of this user. - * + * * @return Home directory */ public static String getMacOsUserHome() { @@ -87,7 +87,7 @@ public class EnvironmentUtil { /** * Returns the home directory of DOCS (e.g. /var/docs). - * + * * @return Home directory */ public static String getDocsHome() { diff --git a/docs-core/src/main/resources/config.properties b/docs-core/src/main/resources/config.properties index 4e046a45..77078578 100644 --- a/docs-core/src/main/resources/config.properties +++ b/docs-core/src/main/resources/config.properties @@ -1 +1 @@ -db.version=18 \ No newline at end of file +db.version=19 \ No newline at end of file diff --git a/docs-core/src/main/resources/db/update/dbupdate-019-0.sql b/docs-core/src/main/resources/db/update/dbupdate-019-0.sql new file mode 100644 index 00000000..c9524b65 --- /dev/null +++ b/docs-core/src/main/resources/db/update/dbupdate-019-0.sql @@ -0,0 +1,2 @@ +create index IDX_DOT_COMPOSITE on T_DOCUMENT_TAG (DOT_IDDOCUMENT_C, DOT_IDTAG_C, DOT_DELETEDATE_D); +update T_CONFIG set CFG_VALUE_C = '19' where CFG_ID_C = 'DB_VERSION'; diff --git a/docs-web/src/dev/resources/config.properties b/docs-web/src/dev/resources/config.properties index 28a3b40a..47a648c1 100644 --- a/docs-web/src/dev/resources/config.properties +++ b/docs-web/src/dev/resources/config.properties @@ -1,3 +1,3 @@ api.current_version=${project.version} api.min_version=1.0 -db.version=18 \ No newline at end of file +db.version=19 \ No newline at end of file diff --git a/docs-web/src/prod/resources/config.properties b/docs-web/src/prod/resources/config.properties index 28a3b40a..47a648c1 100644 --- a/docs-web/src/prod/resources/config.properties +++ b/docs-web/src/prod/resources/config.properties @@ -1,3 +1,3 @@ api.current_version=${project.version} api.min_version=1.0 -db.version=18 \ No newline at end of file +db.version=19 \ No newline at end of file diff --git a/docs-web/src/stress/resources/config.properties b/docs-web/src/stress/resources/config.properties index 28a3b40a..47a648c1 100644 --- a/docs-web/src/stress/resources/config.properties +++ b/docs-web/src/stress/resources/config.properties @@ -1,3 +1,3 @@ api.current_version=${project.version} api.min_version=1.0 -db.version=18 \ No newline at end of file +db.version=19 \ No newline at end of file