Enum sqlx_migrate::cli::Operation
source · pub enum Operation {
Migrate {
name: Option<String>,
version: Option<u64>,
},
Revert {
name: Option<String>,
version: Option<u64>,
},
Set {
name: Option<String>,
version: Option<u64>,
},
Check {},
Status {},
Add {
sql: bool,
reversible: bool,
ty: DatabaseType,
name: String,
},
}
Available on crate feature
cli
only.Expand description
A command-line operation.
Variants§
Migrate
Fields
Apply all migrations up to and including the given migration.
If no migration is given, all migrations are applied.
Revert
Fields
Revert the given migration and all subsequent ones.
If no migration is set, all applied migrations are reverted.
Set
Fields
Forcibly set a given migration.
This does not apply nor revert any migrations, and only overrides migration status.
Check
Fields
Verify migrations and print errors.
Status
Fields
List all migrations.
Add
Fields
§
ty: DatabaseType
The SQLx type of the database in Rust migrations.
By default, all migrations will be using Any
.
Add a new migration.
The migrations default to Rust files.
Trait Implementations§
source§impl FromArgMatches for Operation
impl FromArgMatches for Operation
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.source§impl Subcommand for Operation
impl Subcommand for Operation
source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self
can parse a specific subcommandAuto Trait Implementations§
impl RefUnwindSafe for Operation
impl Send for Operation
impl Sync for Operation
impl Unpin for Operation
impl UnwindSafe for Operation
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more