Postgres config

Unimus support forum
Post Reply
marcsivak
Posts: 3
Joined: Thu Mar 05, 2020 4:10 pm

Thu Mar 05, 2020 4:13 pm

Trying to initialize system against a postgres DB and keep receiving the message :

Could not upgrade the database.
Please drop and recreate the database and try again, or contact support.
marcsivak
Posts: 3
Joined: Thu Mar 05, 2020 4:10 pm

Thu Mar 05, 2020 4:19 pm

DB setup:

CREATE DATABASE unimus
WITH
OWNER = unimusadmin
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
User avatar
Tomas
Posts: 803
Joined: Sat Jun 25, 2016 12:33 pm

Thu Mar 05, 2020 5:24 pm

Hi,

Could you please check the log file - it should offer more details on why DB creation fails.
("/var/log/unimus/unimus.log" or "C:\ProgramData\Unimus\log\unimus.log")
marcsivak
Posts: 3
Joined: Thu Mar 05, 2020 4:10 pm

Thu Mar 05, 2020 6:18 pm

2020-03-05 12:15:51.335 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.w.step.ValidatingLicenseKey : Validating license key
2020-03-05 12:15:52.098 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.business.file.FileSystemProperties : Saving license key to file 'unimus.properties'
2020-03-05 12:15:52.099 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.w.step.DatabaseConnectionCheck : Testing database connection
2020-03-05 12:15:52.108 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.w.step.DatabaseConnectionCheck : Database connection test passed
2020-03-05 12:15:52.109 INFO 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.wizard.step.DatabaseUpdate : Connecting and creating / updating database tables (POSTGRESQL)
2020-03-05 12:15:52.583 ERROR 1260 --- [SimpleAsyncTaskExecutor-34] liquibase : classpath:/db/changelog/postgresql/db.changelog-master-postgresql.xml: classpath:/db/changelog/postgresql/db.changelog-0.3.0-postgresql.xml::1489410393841-2::jozef (generated): Change Set classpath:/db/changelog/postgresql/db.changelog-0.3.0-postgresql.xml::1489410393841-2::jozef (generated) failed. Error: ERROR: syntax error at or near "OIDS"
Position: 209 [Failed SQL: CREATE TABLE public.backup (id BIGSERIAL NOT NULL, create_time BIGINT NOT NULL, device_backup OID NOT NULL, type VARCHAR(255) NOT NULL, device_id BIGINT NOT NULL, CONSTRAINT backup_pkey PRIMARY KEY (id))WITH OIDS]

2020-03-05 12:15:52.584 WARN 1260 --- [SimpleAsyncTaskExecutor-34] n.u.b.d.LiquibaseChangeExecListenerImpl : [runFailed] Changelog = 'classpath:/db/changelog/postgresql/db.changelog-master-postgresql.xml'. ChangeSet = '1489410393841-2'
2020-03-05 12:15:52.598 WARN 1260 --- [SimpleAsyncTaskExecutor-34] n.u.s.b.wizard.step.DatabaseUpdate : Failed to connect and create / update database. Reason = liquibase.exception.MigrationFailedException: Migration failed for change set classpath:/db/changelog/postgresql/db.changelog-0.3.0-postgresql.xml::1489410393841-2::jozef (generated):
Reason: liquibase.exception.DatabaseException: ERROR: syntax error at or near "OIDS"
Position: 209 [Failed SQL: CREATE TABLE public.backup (id BIGSERIAL NOT NULL, create_time BIGINT NOT NULL, device_backup OID NOT NULL, type VARCHAR(255) NOT NULL, device_id BIGINT NOT NULL, CONSTRAINT backup_pkey PRIMARY KEY (id))WITH OIDS]
2020-03-05 12:15:52.599 WARN 1260 --- [SimpleAsyncTaskExecutor-34] n.unimus.system.bootstrap.wizard.Wizard : Wizard failed. Reason = liquibase.exception.MigrationFailedException: Migration failed for change set classpath:/db/changelog/postgresql/db.changelog-0.3.0-postgresql.xml::1489410393841-2::jozef (generated):
Reason: liquibase.exception.DatabaseException: ERROR: syntax error at or near "OIDS"
Position: 209 [Failed SQL: CREATE TABLE public.backup (id BIGSERIAL NOT NULL, create_time BIGINT NOT NULL, device_backup OID NOT NULL, type VARCHAR(255) NOT NULL, device_id BIGINT NOT NULL, CONSTRAINT backup_pkey PRIMARY KEY (id))WITH OIDS]. Wizard{running=true, finished=false, failed=true}
User avatar
Tomas
Posts: 803
Joined: Sat Jun 25, 2016 12:33 pm

Mon Mar 09, 2020 7:09 pm

Hi,

Apologies for the delayed response - I talked with the devs today regarding the PGSQL issue.
PGSQL v12 (and newer) do not support OIDs anymore, and as such these versions of PGSQL are currently not supported by Unimus.

We have support for these PGSQL versions to our internal Roadmap.
Adding support will require some work, as we need to introduce support for 2 separate DB scripts and changelogs for a single DB engine - something Unimus is currently not ready for. I can't currently promise any ETA on v12+ support, but it's definitely on our radar.
Post Reply