pub struct Schema {
pub tables: Vec<Table>,
}
Expand description
Represents a SQL database schema.
Fields§
§tables: Vec<Table>
Implementations§
Source§impl Schema
impl Schema
Sourcepub fn migrate_to(
self,
desired: Schema,
options: &MigrationOptions,
) -> Result<Migration>
pub fn migrate_to( self, desired: Schema, options: &MigrationOptions, ) -> Result<Migration>
Calculate the migration necessary to move from self: Schema
to the argument desired: Schema
.
Sourcepub fn name_schema(&mut self, schema: &str)
pub fn name_schema(&mut self, schema: &str)
Propagate the schema name to all tables.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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