Skip to content

NuGet Commands: Drop-Database - #4907

Closed
bricelam wants to merge 3 commits into
dotnet:devfrom
bricelam:fist
Closed

bricelam wants to merge 3 commits into
dotnet:devfrom
bricelam:fist

Conversation

@bricelam

Copy link
Copy Markdown
Contributor

This includes changes from #4657. Only 03f95a2 needs review.

cc @natemcmaster @laskoviymishka (aka Rarity)

Resolves #2476

Reporter.Output.WriteLine(message);
Reporter.Output.WriteLine(
$"Are you sure you want to drop the database '{database}' on server '{dataSource}'? (y/N)");
var readedKey = Console.ReadKey().KeyChar;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we skip read altogether this if --force was used?

@natemcmaster

Copy link
Copy Markdown
Contributor

It looks like --force on dotnet-ef doesn't actually skip the prompt.

Otherwise, :shipit:

@bricelam

Copy link
Copy Markdown
Contributor Author

Thanks. I'll do a bit of bashing on this too before merging.

confirmCheck = [Func[string, string, bool]]{
param ($database, $dataSource)

return $PSCmdlet.ShouldProcess("$database on $dataSource")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad news. This results in Cannot serialize delegates over unmanaged function pointers, dynamic methods or methods outside the delegate creator's assembly. 😞

@bricelam

Copy link
Copy Markdown
Contributor Author

Recalling. We need to rethink how the confirmation works. One idea @natemcmaster had was to get the information in a separate command (e.g. Get-DbContext / dotnet ef dbcontext show --json), then prompt, then call drop.

@bricelam bricelam closed this Mar 29, 2016
@bricelam bricelam mentioned this pull request Apr 1, 2016
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

Successfully merging this pull request may close these issues.

4 participants