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 a Drop command to Evolve. #277

Open
Meigs2 opened this issue Jun 24, 2022 · 2 comments
Open

Add a Drop command to Evolve. #277

Meigs2 opened this issue Jun 24, 2022 · 2 comments

Comments

@Meigs2
Copy link

Meigs2 commented Jun 24, 2022

Add Drop command to Evolve

Hi! I'd like to get thoughts on adding a Drop command to the Library and CLI tool. Some other database versioning systems like DbUp and Grate let you drop the entire database as a command, usually as part of a build step for running integration tests.

I am using Evolve right now in a project and noticed it does not have this functionality. Currently, I am manually dropping the database in powershell before migrating using a custom CLI tool I wrote for versioning the app that uses Evolve. I feel it would be beneficial to add a Drop command to facilitate integration testing as part of a build step.

If this is something that fits within the scope of the project, let me know and I'll get started working on a PR to add the functionality.

@Meigs2
Copy link
Author

Meigs2 commented Jun 24, 2022

Updated! I hit enter slightly too early 😅

@Meigs2
Copy link
Author

Meigs2 commented Jun 25, 2022

Just to add some more detail/clarification here, the Drop command would essentially connect to the cluster, drop the database specified in the connection string, then proceed as if the Migrate was executed. If evolve doesn't already create the database specified in the string before running its migrations, it would CREATE DATABASE and then migrate.

Would Recreate or another command name be more clear?

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

No branches or pull requests

1 participant