Executing JS script file from liquibase mongoDB changeset

Hello,
I want to integrate liquibase into our db as a version control tool, we are using Java with spring(not boot with beans)
the following link shows how we can execute liquibase schema changes:

We are using mongodb and I saw that there is a new driver called liquibase mongo(on maven).

however we are running the schema changes from js script files,
Is that possible to execute js file using liquibase-mongo? I know for sql you have a tag with the script location in it
Many thanks,
Roie

1 Like

One more issue:
the java class in the readme file:

it is not lined up with 4.1.1 mongoDB liquibase version,
can you please update the guide? (a full working example would be amazing !! :slight_smile: )

Hi @roie!

To answer your question above, when your changeset points to a script, it is looking for valid sql that would be valid if you were to run it directly against the db platform. A js script would not work but, liquibase can take sql and run it b/c it just opens a jdbc connection to the target db, and executes sql.

Originally, I believe you are trying to version your db changes. If you create sql, or sql changelogs and save them in a directory structure in your repo, those scripts will be versioned. The database maintains its individual version level in its databasechanglelog table.

HTH,

Ronak