db-migrate / db-migrate/node-db-migrate
How Should the Schemas Work
- Dominant language
- JavaScript
- Stars
- 2.3k
- Forks
- 361
- PR merge metrics
- No merged PRs in 30d
Description
## I'm submitting a...
- [ ] Bug report
- [ ] Feature request
- [x] Question
Please how should one deal with the schemas?
## Current behavior
Currently I define schema similar to how it is described in [docs](https://db-migrate.readthedocs.io/en/latest/Getting%20Started/configuration/#configuration)
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
```json
{
"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:
Contributor guide
Assessment
This issue has not been assessed yet.