#[non_exhaustive]pub enum UnpreservedReason {
NonPortableDefault,
UnsupportedConstraint,
}Expand description
Why a piece of the source schema could not be reproduced.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NonPortableDefault
The column’s DEFAULT expression is not portable to another database.
Hyper stores non-literal defaults fully qualified by the database that
contains the table: NOW() comes back out of pg_attrdef.adsrc as
"mydb"."pg_catalog"."now"(), and DATE '2020-01-01' as
"mydb"."pg_catalog"."date" '2020-01-01'. Re-emitting that text into a
different database is accepted by the engine but stores a reference to
"mydb" — a database that will not be attached when the copy is opened
on its own later. Dropping the default is the lesser evil, so long as
it is reported.
UnsupportedConstraint
A constraint the destination CREATE TABLE cannot restate.
A Hyper-written table only ever holds the assumed key forms, which are
reproduced exactly. This covers what a .hyper from an engine with
index support could contain — an enforced PRIMARY KEY or UNIQUE,
a CHECK, a foreign key — where restating it as ASSUMED would
downgrade an enforced constraint to an unenforced one and call it
preserved.
Trait Implementations§
Source§impl Clone for UnpreservedReason
impl Clone for UnpreservedReason
Source§fn clone(&self) -> UnpreservedReason
fn clone(&self) -> UnpreservedReason
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UnpreservedReason
impl Debug for UnpreservedReason
Source§impl Display for UnpreservedReason
impl Display for UnpreservedReason
impl Eq for UnpreservedReason
Source§impl PartialEq for UnpreservedReason
impl PartialEq for UnpreservedReason
impl StructuralPartialEq for UnpreservedReason
Auto Trait Implementations§
impl Freeze for UnpreservedReason
impl RefUnwindSafe for UnpreservedReason
impl Send for UnpreservedReason
impl Sync for UnpreservedReason
impl Unpin for UnpreservedReason
impl UnsafeUnpin for UnpreservedReason
impl UnwindSafe for UnpreservedReason
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request