Struct migrant_lib::migration::FileMigration [] [src]

pub struct FileMigration {
    pub tag: String,
    pub up: Option<PathBuf>,
    pub down: Option<PathBuf>,
    pub stamp: Option<DateTime<Utc>>,
}

Define a migration that uses SQL statements saved in files.

Note: Files defined in this migration must be present at run-time. File paths can be absolute or relative. Relative file paths are relative to the directory from which the program is run.

Fields

Methods

impl FileMigration
[src]

[src]

Create a new FileMigration with a given tag

Tags may contain [a-z0-9-]

[src]

Define the file to use for running up migrations.

Note: Files defined in this migration must be present at run-time. File paths can be absolute or relative. Relative file paths are relative to the directory from which the program is run.

[src]

Define the file to use for running down migrations.

Note: Files defined in this migration must be present at run-time. File paths can be absolute or relative. Relative file paths are relative to the directory from which the program is run.

[src]

Box this migration up so it can be stored with other migrations

Trait Implementations

impl Clone for FileMigration
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for FileMigration
[src]

[src]

Formats the value using the given formatter.

impl Migratable for FileMigration
[src]

[src]

Define functionality that runs for up migrations

[src]

Define functionality that runs for down migrations

[src]

A unique identifying tag

[src]

Option migration description. Defaults to Migratable::tag