Skip to content

Commands: Drop Database #2476

Closed
Closed

Description

@bricelam

In the past, we've talked about having a command to delete the database (i.e. call EnsureDeleted). Something like...

dnx ef database delete

Activity

  1. added this to the Backlog milestone on Jun 26, 2015
  2. benmillane commented on Jun 26, 2015

    @benmillane

    Would it be possible to have options similar to what we've had in the EF SetInitializer method e.g. DropCreateDatabaseAlways or DropCreateDatabaseIfModelChanges. Something like

    dnx . ef migration add NewMigration
    dnx . ef migration apply -db DropCreateDB

    Not sure on the limitations of the command line stuff as i'm new to it, but enjoying it so far, just feels like it's lacking in power currently.

  3. added
    help wanted
    on Oct 8, 2015
  4. modified the milestones: , Backlog on Mar 25, 2016
  5. self-assigned this
    on Mar 25, 2016
  6. modified the milestones: Backlog, on Mar 29, 2016
  7. bricelam commented on Apr 1, 2016

    @bricelam
    ContributorAuthor

    dotnet ef database drop was added by @laskoviymishka in PR #4657.

    I attempted to add Drop-Database in PR #4907, but ran into issues marshalling script blocks across domain boundaries.

    To complete this issue, we need to...

    1. Add a way to get the database name and server from PowerShell (e.g. a Get-DbContext command)
    2. Add the Drop-Database command. The code in bricelam:fist is a good starting point.
  8. removed their assignment
    on Aug 9, 2016
  9. self-assigned this
    on Aug 11, 2016
  10. removed
    help wanted
    on Aug 11, 2016
  11. modified the milestones: 1.1.0, Backlog on Aug 11, 2016
  12. natemcmaster commented on Aug 15, 2016

    @natemcmaster
    Contributor

    Added in #6300

  13. modified the milestones: , 1.1.0 on Oct 15, 2022
  14. added theissue type on Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions