Skip to content
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

Merged
merged 8 commits into from
Dec 16, 2024

Conversation

FelixMalfait
Copy link
Member

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?

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 requiring ENABLE_DB_MIGRATIONS=true to running unless ENABLE_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

@FelixMalfait FelixMalfait force-pushed the change-enable-migration-default branch from f278c31 to a4f0d14 Compare December 16, 2024 10:34
@@ -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`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false?

Copy link
Member

@Weiko Weiko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FelixMalfait FelixMalfait merged commit c90d2fd into main Dec 16, 2024
19 checks passed
@FelixMalfait FelixMalfait deleted the change-enable-migration-default branch December 16, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants