From a55ca6ca1ce71b3dfca8835417d0dc73fd547e93 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Mon, 28 Sep 2020 11:42:03 +0200 Subject: [PATCH] Fix db init --- docker/deployment/dev-db.yml | 4 ++-- docker/dev-db.yml | 1 + src/main/resources/db/migration/V1.0.0__init.sql | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docker/deployment/dev-db.yml b/docker/deployment/dev-db.yml index 2d171099..fe6a59e3 100644 --- a/docker/deployment/dev-db.yml +++ b/docker/deployment/dev-db.yml @@ -4,8 +4,8 @@ services: db: build: ./db environment: - POSTGRES_USER: root - POSTGRES_PASSWORD: 'changeme' + POSTGRES_USER: hangar + POSTGRES_PASSWORD: 'hangar' POSTGRES_DB: hangar ports: - "5432:5432" diff --git a/docker/dev-db.yml b/docker/dev-db.yml index 2d171099..72ddb313 100644 --- a/docker/dev-db.yml +++ b/docker/dev-db.yml @@ -4,6 +4,7 @@ services: db: build: ./db environment: + POSTGRES_MULTIPLE_DATABASES: hangar,hangarauth POSTGRES_USER: root POSTGRES_PASSWORD: 'changeme' POSTGRES_DB: hangar diff --git a/src/main/resources/db/migration/V1.0.0__init.sql b/src/main/resources/db/migration/V1.0.0__init.sql index 12ee6d6f..87ff614a 100644 --- a/src/main/resources/db/migration/V1.0.0__init.sql +++ b/src/main/resources/db/migration/V1.0.0__init.sql @@ -952,7 +952,7 @@ SELECT p.id, LIMIT 5)) AS promoted_versions, ((setweight((to_tsvector('english'::regconfig, p.name::text) || to_tsvector('english'::regconfig, regexp_replace(p.name::text, '([a-z])([A-Z]+)'::text, - '\1_\2'::text, 'g'::text)))) || + '\1_\2'::text, 'g'::text))), 'A'::"char") || setweight(to_tsvector('english'::regconfig, p.description::text), 'B'::"char")) || setweight(to_tsvector('english'::regconfig, array_to_string(p.keywords, ' '::text)), 'C'::"char")) || setweight( to_tsvector('english'::regconfig, p.owner_name::text) || to_tsvector('english'::regconfig,