-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
feat: Make disableMigration
option handled by environment variable
#8634
feat: Make disableMigration
option handled by environment variable
#8634
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@0417taehyun is attempting to deploy a commit to the unleash-team Team on Vercel. A member of the Team first needs to authorize it. |
Hi @0417taehyun I think this makes sense because this is already a configurable option. There's a linting issue you should just run Regarding testing, we test that after the migrations applied Unleash works well, if migrations are not applied there's no guarantee that Unleash will work well and most likely it won't work, so I don't think there's need to test this. Maybe the only thing that comes to mind is testing that when this is disabled the migrations are not executed. Maybe just checking if this log is written: unleash/src/lib/server-impl.ts Lines 146 to 147 in a7d581a
But to be honest, I'm ok if you don't test this |
Thanks for answering my question and checking linting issue! I fixed the issued by using |
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.
Looks good! Thanks for the contribution!
About the changes
Closes #
Important files
Discussion points
In some cases, people want to disable database migration. For example, some people or companies want to grant whole permissions to handle the schema by DBAs, not by application level hence I use
parseEnvVarBoolean
to handledisableMigration
option by environment variable. I set the default value asfalse
for the backward compatibility.However, I wonder where to add test code of it because all the unit and e2e test is a kind of testing the whole configuration.