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 ability to purge a project #187

Open
Ovid opened this issue Sep 29, 2014 · 2 comments
Open

Add ability to purge a project #187

Ovid opened this issue Sep 29, 2014 · 2 comments
Labels
Milestone

Comments

@Ovid
Copy link
Collaborator

Ovid commented Sep 29, 2014

Request

I would like the ability to completely purge a project from the sqitch schema without manually going in and deleting everything.

$ sqitch purge my_project
WARNING: You are about to completely remove all traces of 'my_project' from
sqitch!! Are you absolutely sure you want to do this? [y/N]

Rationale

I'm doing a huge amount of sqitch development for a client and many times I'm temporarily adding a sqitch project, only to need to either remove it permanently, or remove it temporarily while the project work is being redone. Scrubbing the data from the sqitch schema manually is not only time-consuming, but it's also fraught with danger due to issue #185 (no FK constraints in the sqitch schema).

As an alternative, setting a boolean flag on projects table to mark it as purged would allow one to do this:

$ sqitch restore my_project
@theory
Copy link
Collaborator

theory commented Sep 29, 2014

I'm assuming you have multiple projects in a single database? Doesn't sqitch revert do the trick? If it's only because it leaves rows in the log table (see also #185), perhaps an option to revert could tell Sqitch to also remove the log entries. Maybe sqitch revert --purge?

@Ovid
Copy link
Collaborator Author

Ovid commented Oct 2, 2014

Yes, we have multiple projects in a single database. Having a --purge option would be nice with revert, though I can see danger there :) But you're right, it's all of the log events which are then frustrating. Plus, there's at least on time I've dropped a project and never added it back (that may happen again in the future).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants