I am moving an app from Oracle to Postgres. I have made sure that sys_db_changelog exists and includes all the Postgresql init scripts as entries, but I still get the message “The database does not exist or does not contain the tables required for the application components, but the project already has initialization scripts”.
I turned on Debug in Studio. Here are the log entries:
io.backend.ed.ddl.DbManager - Opening connection to DB: url=jdbc:postgresql://postgres/pas, user=pasrade
2020-06-30 12:33:29,546 [91693315] DEBUG - tudio.backend.ed.ddl.DbManager - Opening connection to DB: url=jdbc:postgresql://postgres/pas, user=pasrade
2020-06-30 12:33:30,009 [91693778] INFO - tudio.backend.ed.ddl.DbManager - Table SYS_DB_CHANGELOG required for 'com.haulmont.cuba:cuba-global:$cubaVersion' application component is not found
Here are entries from the SQL debug log:
select current_database() as a, current_schemas(false) as b
-- ] --------------------------------------------------
-- 2020-06-29 13:54:48 [rade] [pas@postgres] [console: console [pas@postgres]] [session id: 943215277] [statement id: 1821245399] results received
-- 2020-06-29 13:54:48 [rade] [pas@postgres] [console: console [pas@postgres]] [session id: 943215277] [statement id: 1821245399] finished - execution time: 25 ms, fetching time: 30 ms, total result sets count: 1
-- [ --------------------------------------------------
-- 2020-06-29 13:54:48 [rade] [pas@postgres] [console: console [pas@postgres]] [session id: 943215277] [statement id: 1821245400]
select * from sys_db_changelog
-- ] --------------------------------------------------
-- 2020-06-29 13:54:48 [rade] [pas@postgres] [console: console [pas@postgres]] [session id: 943215277] [statement id: 1821245400] results received
-- 2020-06-29 13:54:49 [rade] [pas@postgres] [console: console [pas@postgres]] [session id: 943215277] [statement id: 1821245400] finished - execution time: 64 ms, fetching time: 284 ms, total result sets count: 1
Here I show that the table does exist on the same pasrade schema using the same login:
There are even entries for the postgres init scripts:
How do I get past this message and run my app?