Sqlx Cli: Added force flag to drop database for postgres (#2873)

* Updated ahash so it can compile on mac

* Updated MigrateDatabase Trait + related functions

* Postgres force drop database flag impl

* Update migrate.rs

* Reverted MigrateDatabase Trait

* Update migrate.rs

* Update migrate.rs

* Added force drop database fn impl

* Add Migrate Error

* Fixed changed function name
This commit is contained in:
Vraj Shah
2023-11-21 14:11:08 -05:00
committed by GitHub
parent ed1b030e91
commit fda415927a
10 changed files with 78 additions and 15 deletions

View File

@@ -76,6 +76,10 @@ pub enum DatabaseCommand {
#[clap(flatten)]
connect_opts: ConnectOpts,
/// PostgreSQL only: force drops the database.
#[clap(long, short, default_value = "false")]
force: bool,
},
/// Drops the database specified in your DATABASE_URL, re-creates it, and runs any pending migrations.
@@ -88,6 +92,10 @@ pub enum DatabaseCommand {
#[clap(flatten)]
connect_opts: ConnectOpts,
/// PostgreSQL only: force drops the database.
#[clap(long, short, default_value = "false")]
force: bool,
},
/// Creates the database specified in your DATABASE_URL and runs any pending migrations.