-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Change default behavior of ENABLE DB MIGRATION #9077
Conversation
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.
PR Summary
This PR modifies the Docker entrypoint script to enable database migrations by default, requiring explicit disablement rather than enablement, aimed at simplifying the initial setup process.
- Changed condition in
/packages/twenty-docker/twenty/entrypoint.sh
from requiringENABLE_DB_MIGRATIONS=true
to running unlessENABLE_DB_MIGRATIONS=false
- Impacts worker containers which may need explicit
ENABLE_DB_MIGRATIONS=false
to prevent duplicate migrations - Relates to SERVER_URL redirection issue (Docker Compose Upgrade to 0.34 breaks Redirect #9031) as part of broader Docker configuration simplification
- Could affect existing deployments that rely on migrations being disabled by default
- Documentation in
/packages/twenty-website/src/content/developers/self-hosting/upgrade-guide.mdx
should be updated to reflect this change
1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile
f278c31
to
a4f0d14
Compare
@@ -20,6 +20,12 @@ If you used Docker Compose, follow these steps: | |||
|
|||
## Version-specific upgrade steps | |||
|
|||
### v0.34.0 to v0.40.0 | |||
|
|||
- We replaced `ENABLE_DB_MIGRATIONS` with `DISABLE_DB_MIGRATIONS` (default value is now `true`) |
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.
false?
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.
LGTM
See: #9031 (comment)
I think it would be easier if the default behavior for the container was to run the migration, and setting the environment variable would be used to disable it (e.g. on the worker).
Long-term goal is for the default setup to work out of the box with ~2 env variables only (database url, redis url)
I don't think there's a big risk if people forget to turn it off on the worker?