-
-
Couldn't load subscription status.
- Fork 22.9k
feature/Add DATABASE_SCHEMA support for PostgreSQL #5368
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
base: main
Are you sure you want to change the base?
Conversation
| migrationsRun: false, | ||
| entities: Object.values(entities), | ||
| migrations: postgresMigrations, | ||
| migrationsTableName: 'migrations', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this necessary? can we use the default table name instead of hardcoding migrations as the table name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, im just completing the change as it seems a bit more larger. And ill refactor it better.
Thanks for the comment
| }) | ||
| break | ||
| case 'postgres': | ||
| const dbSchema = process.env.DATABASE_SCHEMA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to wrap these in curly brackets if using const
|
also if you can give a couple of screenshots to make sure this works, that'd be great |
This PR adds support for the DATABASE_SCHEMA environment variable. This allows users to specify a default schema when using a PostgreSQL database, which is necessary for multi-schema environments.