diff --git a/sqlx-mysql/src/any.rs b/sqlx-mysql/src/any.rs index 632abace23..303522fa6a 100644 --- a/sqlx-mysql/src/any.rs +++ b/sqlx-mysql/src/any.rs @@ -62,6 +62,13 @@ impl AnyConnectionBackend for MySqlConnection { Connection::should_flush(self) } + #[cfg(feature = "migrate")] + fn as_migrate( + &mut self, + ) -> sqlx_core::Result<&mut (dyn sqlx_core::migrate::Migrate + Send + 'static)> { + Ok(self) + } + fn fetch_many<'q>( &'q mut self, query: &'q str, diff --git a/sqlx-postgres/src/any.rs b/sqlx-postgres/src/any.rs index 5703c10795..fed7422046 100644 --- a/sqlx-postgres/src/any.rs +++ b/sqlx-postgres/src/any.rs @@ -65,6 +65,13 @@ impl AnyConnectionBackend for PgConnection { Connection::should_flush(self) } + #[cfg(feature = "migrate")] + fn as_migrate( + &mut self, + ) -> sqlx_core::Result<&mut (dyn sqlx_core::migrate::Migrate + Send + 'static)> { + Ok(self) + } + fn fetch_many<'q>( &'q mut self, query: &'q str, diff --git a/sqlx-sqlite/src/any.rs b/sqlx-sqlite/src/any.rs index c3be1772bc..517d601986 100644 --- a/sqlx-sqlite/src/any.rs +++ b/sqlx-sqlite/src/any.rs @@ -67,6 +67,13 @@ impl AnyConnectionBackend for SqliteConnection { Connection::should_flush(self) } + #[cfg(feature = "migrate")] + fn as_migrate( + &mut self, + ) -> sqlx_core::Result<&mut (dyn sqlx_core::migrate::Migrate + Send + 'static)> { + Ok(self) + } + fn fetch_many<'q>( &'q mut self, query: &'q str,