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 `diesel drop` to the CLI #146

Closed
mcasper opened this Issue Jan 30, 2016 · 5 comments

Comments

Projects
None yet
2 participants
@mcasper
Collaborator

mcasper commented Jan 30, 2016

We should have some way of dropping the user's database in the CLI, for whenever the user wants to reset their data or their schema. This command could be diesel drop, diesel drop_db, diesel drop_database... This would allow the workflow of diesel drop; diesel setup to reset your database.

My thought of what it should do:

  • Drop the database specified in the user's database-url string.

If we like this, I'll go ahead and implement it this afternoon.

@mcasper

This comment has been minimized.

Collaborator

mcasper commented Jan 30, 2016

Or maybe database should be a subcommand, and then have its own derivatives. So it might become

diesel database drop
diesel database setup
diesel database foo
@sgrif

This comment has been minimized.

Member

sgrif commented Jan 30, 2016

Is there any use case for just drop on its own? Should we just have this be diesel database reset?

@mcasper

This comment has been minimized.

Collaborator

mcasper commented Jan 30, 2016

You know, I can't immediately come up with a use case for drop on its own. Maybe just reset for now, and see if legitimate use cases for drop come in

@sgrif

This comment has been minimized.

Member

sgrif commented Jan 30, 2016

Just to clarify, my reasoning here is that we definitely want reset as a command either way, and I'd rather not expose drop on its own without a specific reason, as it's just one more thing to maintain and/or change if we ever decide to do something like rails/rails#22967

@sgrif sgrif added this to the 0.6 milestone Jan 30, 2016

@mcasper

This comment has been minimized.

Collaborator

mcasper commented Feb 1, 2016

Resolved by #161

@mcasper mcasper closed this Feb 1, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment