diff --git a/.circleci/test-deploy.yml b/.circleci/test-deploy.yml index c9eb69a..9874a4b 100644 --- a/.circleci/test-deploy.yml +++ b/.circleci/test-deploy.yml @@ -110,6 +110,7 @@ workflows: filters: *filters working_directory: testdata dir_name: my-cool-project + search_path: public # The orb must be re-packed for publishing, and saved to the workspace. - orb-tools/pack: filters: *release-filters diff --git a/src/jobs/postgres.yml b/src/jobs/postgres.yml index 1d4858d..e42d4b9 100755 --- a/src/jobs/postgres.yml +++ b/src/jobs/postgres.yml @@ -53,6 +53,12 @@ parameters: type: string default: "cimg/postgres:16.2" description: 'The Docker image to use for the PostgreSQL database.' + search_path: + type: string + default: "" + description: | + The search path to use when running migrations. For example, `public`. + Set `search_path` to `public` to run migrations in the public schema (schema scope). resource_class: type: enum enum: ["small", "medium", "medium+", "large", "xlarge", "2xlarge", "2xlarge+"] @@ -73,12 +79,27 @@ steps: - setup: version: <> cloud_token_env: <> - - migrate_push: - working_directory: <> - dir_name: <> - dir: <> - tag: <> - config: <> - env: <> - vars: <> - dev_url: postgres://postgres:pass@localhost:5432/postgres?sslmode=disable + - when: + condition: <> + steps: + - migrate_push: + working_directory: <> + dir_name: <> + dir: <> + tag: <> + config: <> + env: <> + vars: <> + dev_url: postgres://postgres:pass@localhost:5432/postgres?sslmode=disable&search_path=<> + - unless: + condition: <> + steps: + - migrate_push: + working_directory: <> + dir_name: <> + dir: <> + tag: <> + config: <> + env: <> + vars: <> + dev_url: postgres://postgres:pass@localhost:5432/postgres?sslmode=disable