Enum sqlx_migrate::cli::Operation [−][src]
pub enum Operation {
Migrate {
name: Option<String>,
version: Option<u64>,
},
Revert {
name: Option<String>,
version: Option<u64>,
},
Force {
name: Option<String>,
version: Option<u64>,
},
Check {},
Status {},
Add {
sql: bool,
reversible: bool,
ty: DatabaseType,
name: String,
},
}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.
Force
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
sql: boolUse SQL for the migrations.
reversible: boolCreate a “revert” or “down” migration.
ty: DatabaseTypeThe SQLx type of the database in Rust migrations.
By default, all migrations will be using Any.
name: StringThe name of the migration.
It must be across all migrations.
Add a new migration.
The migrations default to Rust files.
Trait Implementations
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
fn update_from_arg_matches<'b>(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches<'b>(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches to self.
Test whether Self can parse a specific subcommand
Auto Trait Implementations
impl RefUnwindSafe for Operation
impl UnwindSafe for Operation
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
