Skip to content

Running migration from liquibase CLI fails due to search path not set correctly #156

@sl33k

Description

@sl33k

Hi!

I was trying to import the library manually with liquibase cli, since there is no docker available in my environment.
However it kept failing since the tables were not created under the altium schema by default, and instead in the default public schema.
image

It seems that the migrations/initial-db-scripts/Schema-for-components.sql migrations does not set the default search_path variable correctly. This can be also seen by querying the search_path from psql, which default still to public even after an initial migration run.
image

I've managed to resolve the issue by specificing altium as the search_path during pg_admin database creation,like so
image

Which makes the migration run succesfully, and the database is populated. Maybe this could be fixed in the migrations sql script?

For reference, I'm using Postgres 16.4, and Liquibase 4.29.1 on Windows.
The command used for liquibase is

.\liquibase.bat update --changelog-file=altium-library\migrations\db.changelog-master.xml

and my liquibase.properties file looks like this

url: jdbc:postgresql://localhost:5412/altium-components
username: postgres
password: postgres

Let me know if you need more info.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions