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 synchronize option for typeorm #222

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

smaknsk
Copy link

@smaknsk smaknsk commented Jan 5, 2024

Hello!
I would like to use the synchronize option for development.
Also I have a case where I would like to use these options in my small project without creating and applying a migration.
And of course this is not recommended for production https://typeorm.io/faq#how-do-i-update-a-database-schema.

@eldargab
Copy link
Collaborator

eldargab commented Jan 6, 2024

We had such request before, but I'm not in favour of it.

Will leave it open for other team members to decide. @dzhelezov , @mo4islona

@eldargab
Copy link
Collaborator

eldargab commented Jan 6, 2024

Here is one example showing that it is not as benign as it looks.

Consider the case when both TypeORM based graphql server extensions and the processor is used. User can easily start both simultaneously leading to a race between migration procedures. At the same time we know, that TypeORM doesn't handle migration races properly.

@smaknsk
Copy link
Author

smaknsk commented Jan 18, 2024

The default value is false. If someone sets this to true, they probably know what they're doing.
Squid-sdk is a framework and I think being able to control typeORM settings is a good thing :)

@llllvvuu
Copy link

Generally people don't set this in prod. It is useful for dev, where too lazy to run migrations. I would be a user.

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.

3 participants