Struct barrel::migration::Migration [] [src]

pub struct Migration { /* fields omitted */ }

Represents a schema migration on a database

Methods

impl Migration
[src]

[src]

[src]

Specify a database schema name for this migration

[src]

Creates the SQL for this migration for a specific backend

This function copies state and does not touch the original migration layout. This allows you to call revert later on in the process to auto-infer the down-behaviour

[src]

Automatically infer the down step of this migration

Will thrown an error if behaviour is ambigous or not possible to infer (e.g. revert a drop_table)

[src]

Pass a reference to a migration toolkit runner which will automatically generate and execute

[src]

Create a new table with a specific name

[src]

Create a new table only if it doesn't exist yet

[src]

Change fields on an existing table

[src]

Rename a table

[src]

Drop an existing table

[src]

Only drop a table if it exists

Trait Implementations

Auto Trait Implementations

impl !Send for Migration

impl !Sync for Migration