I have run
liquibase --changelog-file=changelog.postgresql.sql changelog-sync
against an existing DB.
That worked fine and it did populate the databasechangelog
table with the correct IDs and the correct number of changes, in my case 8. So there were 8 records in the table that did match the generated changelog from the sync. All looks perfect.
When I run update
from the CLI it works:
liquibase update --changelog-file=changelog.postgresql.sql
But when I run update
from Node with package require('liquibase').Liquibase
I get
ERROR: relation "mytable" already exists.
My Node code works when I don’t do changelog sync and just use the output from generate-changelog.
So node and liquibase do work in my code. If I add a column, update
does it. All works good.
BUT if I do a Node update after changelog-sync
it says file already exists
, and if I do a CLI update it works.