Skip to content

How Should the Schemas Work #741

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 of 3 tasks
kudla opened this issue Jun 12, 2021 · 3 comments
Open
1 of 3 tasks

How Should the Schemas Work #741

kudla opened this issue Jun 12, 2021 · 3 comments

Comments

@kudla
Copy link

kudla commented Jun 12, 2021

I'm submitting a...

  • Bug report
  • Feature request
  • Question

Please how should one deal with the schemas?

Current behavior

Currently I define schema similar to how it is described in docs

Both migration table and migration content are created in the public schema.

Behavior is the same regardless of the defined schema existence.

Expected behavior

  • Defined schema is created if one doesn't exist.
  • Migration table and content affect defined schema

Minimal reproduction of the problem with instructions

{
    "defaultEnv": "def",
    "def": {
      "driver": "pg",
      "host": {"ENV": "PGHOST"},
      "port": {"ENV": "PGPORT"},
      "database": {"ENV": "PGDATABASE"},
      "schema": {"ENV": "PGSCHEMA"},
      "user": {"ENV": "PGUSER"},
      "table": {"ENV": "PG_MIGRATION_TABLE"},
      "password": {"ENV": "PGPASSWORD"}
    }
}

I've tried both ENV link and exact value

What is the motivation / use case for changing the behavior?

Using data separation on schemas level

Environment


db-migrate version: 1.0.0-beta.15, 0.11.12
plugins with versions: not sure I have one
db-migrate driver with versions: pg 1.2.2

Additional information:
- Node version: 14.17.0
- Platform:  Mac

Others:

@kylecombes
Copy link

I'm also wondering how one configures what schema the migration tables are stored under. (I've got an automatic API generator and I'd like to keep the migrations tables out of where it's looking.)

@kylecombes
Copy link

It looks like this issue was reported back in 2017 (#459).

@nstylo
Copy link

nstylo commented Dec 21, 2023

Same issue for me. Will this ever be tackled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants