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

Add no-seed configuration to database:reset #9112

Merged
merged 2 commits into from
Dec 18, 2024
Merged

Add no-seed configuration to database:reset #9112

merged 2 commits into from
Dec 18, 2024

Conversation

FelixMalfait
Copy link
Member

Based on feedback here:
#9109 (comment)

@@ -56,7 +56,7 @@ rawDataSource
]; // See https://supabase.github.io/wrappers/

for (const wrapper of supabaseWrappers) {
if (await checkForeignDataWrapperExists(wrapper)) {
if (await checkForeignDataWrapperExists(`${wrapper.toLowerCase()}_fdw`)) {
Copy link
Member Author

Choose a reason for hiding this comment

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

No related to PR title but this was a small error I noticed

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 adds a no-seed configuration option to the database:reset command to address login issues in self-hosted environments.

  • Added no-seed configuration in /packages/twenty-server/project.json that skips workspace seeding during database reset
  • Modified foreign data wrapper checks in /packages/twenty-server/scripts/setup-db.ts to properly append '_fdw' suffix
  • Added warning in documentation about database erasure during reset operations
  • Fixed issue with multiple workspaces being created in single-workspace mode

4 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@@ -37,7 +37,7 @@ Note : you can run `npx nx run twenty-server:test:integration:with-db-reset` in

### Resetting the database

If you want to reset the database, you can run the following command:
If you want to reset and seed the database, you can run the following command:
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: should also mention that seeding is optional and document the no-seed flag if that's being added

@charlesBochet
Copy link
Member

LGTM, linter is red!

@FelixMalfait FelixMalfait merged commit 45214fe into main Dec 18, 2024
22 checks passed
@FelixMalfait FelixMalfait deleted the fix-9109 branch December 18, 2024 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants