From 5d21e149845815c054065c77d982316dc26cefc4 Mon Sep 17 00:00:00 2001 From: santhoskumara Date: Wed, 13 Mar 2024 13:40:51 +0530 Subject: [PATCH] add env in jooq gradle for issue #722 (#735) Co-authored-by: Santosh Arumugam Co-authored-by: PeeAyBee --- jooq.gradle | 2 +- project-properties.gradle | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/jooq.gradle b/jooq.gradle index b2033abed..40e3f0f73 100644 --- a/jooq.gradle +++ b/jooq.gradle @@ -15,7 +15,7 @@ jooq { } database { name = 'org.jooq.meta.postgres.PostgresDatabase' - inputSchema = 'public' + inputSchema = (hasDBSchema ? getProperty('DB_SCHEMA_POSTGRES') : 'public') // ... excludes = 'batch_.*|schema_migrations' } diff --git a/project-properties.gradle b/project-properties.gradle index f67d3868e..075388f9b 100755 --- a/project-properties.gradle +++ b/project-properties.gradle @@ -8,8 +8,10 @@ project.ext { publishRepo = "https://maven.pkg.github.com/reportportal/commons-dao" dependencyRepos = ["commons", "commons-rules", "commons-model", "commons-bom"] releaseMode = project.hasProperty("releaseMode") - scriptsUrl = commonScriptsUrl + (releaseMode ? getProperty('scripts.version') : 'master') - migrationsUrl = migrationsScriptsUrl + (releaseMode ? getProperty('migrations.version') : 'feature/settings') + hasDBSchema = project.hasProperty("DB_SCHEMA_POSTGRES") + scriptsUrl = commonScriptsUrl + (releaseMode ? getProperty('scripts.version') : 'develop') + migrationsUrl = migrationsScriptsUrl + (releaseMode ? getProperty('migrations.version') : 'develop') + //TODO refactor with archive download testScriptsSrc = [ (migrationsUrl + '/migrations/0_extensions.up.sql') : 'V001__extensions.sql',