pub enum SchemaMode {
Verify,
DryRun,
Execute,
}Expand description
Controls schema migration behavior at startup. Controlled by TEAQL_SCHEMA.
Default is Verify — the safest option for production.
Variants§
Verify
Check that the database schema matches the model. If there is any mismatch, print the details and exit immediately. This is the DEFAULT — no env var needed for the safest behavior.
DryRun
Print the SQL statements that would be executed to bring the schema in sync, but do NOT execute them. For DBA review.
Execute
Actually execute schema changes (CREATE TABLE, ALTER TABLE ADD COLUMN, CREATE INDEX, seed data). Use in development and CI only.
Trait Implementations§
Source§impl Clone for SchemaMode
impl Clone for SchemaMode
Source§fn clone(&self) -> SchemaMode
fn clone(&self) -> SchemaMode
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SchemaMode
Source§impl Debug for SchemaMode
impl Debug for SchemaMode
Source§impl Default for SchemaMode
impl Default for SchemaMode
impl Eq for SchemaMode
Source§impl PartialEq for SchemaMode
impl PartialEq for SchemaMode
Source§fn eq(&self, other: &SchemaMode) -> bool
fn eq(&self, other: &SchemaMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SchemaMode
Auto Trait Implementations§
impl Freeze for SchemaMode
impl RefUnwindSafe for SchemaMode
impl Send for SchemaMode
impl Sync for SchemaMode
impl Unpin for SchemaMode
impl UnsafeUnpin for SchemaMode
impl UnwindSafe for SchemaMode
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