mirror of
https://github.com/plankanban/planka.git
synced 2026-02-24 19:08:59 +03:00
Make default schema name for databse configurable #384
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hazayan on GitHub (Nov 13, 2023).
Currently when a planka database is created, or queried, knex defaults to using public as the schema name. Would it be acceptable to allow the possibility to pass a custom schema name through an environment variable to knex, the same way the database connection url is ? (I can create a PR for that if this gets approved).
@meltyshev commented on GitHub (Nov 13, 2023):
Hi! Is this only needed in Knex? Since we only use it for migrations and the application itself uses Waterline. But in any case, PRs are always welcome :)
@hazayan commented on GitHub (Dec 2, 2023):
Actually I found a much easier solution with no code change required. At least for the
dockerbased deployment. Obviously this solution doesn't change the fact that the database url, database adapter and database schema should be made explicitly configurable along with sane defaults.So the solution in question is to override the
/app/config/env/production.jswith a local version of the same file having the diff below, in thedocker-compose.ymlsection for theplankaapp, effectively allowing for the schema name to be passed on as an environment variable.