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

Tools: Consolidate -Force and -Revert on Remove-Migration #10781

Closed
bricelam opened this issue Jan 26, 2018 · 1 comment
Closed

Tools: Consolidate -Force and -Revert on Remove-Migration #10781

bricelam opened this issue Jan 26, 2018 · 1 comment
Assignees
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@bricelam
Copy link
Contributor

Should we change the way Remove-Migration works?

Questions:

  • When should it check if the migration is applied?
    • What should it do if it can't?
    • What should it do if it is? (e.g. warn, error)
  • When should it revert the migration?
@bricelam
Copy link
Contributor Author

bricelam commented Feb 1, 2018

Design notes

We'll re-purpose -Force to revert the migration if applied. We'll remove the -Revert option introduced in 2.1.0-preview1.

Remove-Migration will...

  • Check if the migration is applied
    • On error, error with: Can't connect. Use -Force to remove. If applied elsewhere, revert it first.
    • If applied, error with: Migration applied. Use -Fore to revert and remove it. If applied elsewhere, revert it everywhere.
    • Otherwise, remove it.

When -Force is specified...

  • Check if the migration is applied
    • On error, warn: Can't connect.
    • If applied, revert it.
  • Remove it.

@bricelam bricelam added closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. and removed needs-design labels Feb 1, 2018
@ajcvickers ajcvickers modified the milestones: 2.1.0-preview2, 2.1.0 Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

No branches or pull requests

2 participants