From ff4dd4c7e71d916989f8df887d962869c687ab3c Mon Sep 17 00:00:00 2001 From: Ryan Leckey Date: Sun, 12 Jul 2020 04:15:37 -0700 Subject: [PATCH] fix: add a couple missing cfgs for the migrate feature --- sqlx-core/Cargo.toml | 2 +- sqlx-core/src/mysql/mod.rs | 4 +++- sqlx-core/src/postgres/mod.rs | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sqlx-core/Cargo.toml b/sqlx-core/Cargo.toml index c0b09821..6487385e 100644 --- a/sqlx-core/Cargo.toml +++ b/sqlx-core/Cargo.toml @@ -13,7 +13,7 @@ authors = [ ] [features] -default = [ "runtime-async-std" ] +default = [ "runtime-async-std", "migrate" ] migrate = [ "sha2", "crc" ] # databases diff --git a/sqlx-core/src/mysql/mod.rs b/sqlx-core/src/mysql/mod.rs index bb5baec6..95cdfa02 100644 --- a/sqlx-core/src/mysql/mod.rs +++ b/sqlx-core/src/mysql/mod.rs @@ -6,7 +6,6 @@ mod connection; mod database; mod error; mod io; -mod migrate; mod options; mod protocol; mod row; @@ -15,6 +14,9 @@ mod type_info; pub mod types; mod value; +#[cfg(feature = "migrate")] +mod migrate; + pub use arguments::MySqlArguments; pub use column::MySqlColumn; pub use connection::MySqlConnection; diff --git a/sqlx-core/src/postgres/mod.rs b/sqlx-core/src/postgres/mod.rs index 0c471feb..22e0444b 100644 --- a/sqlx-core/src/postgres/mod.rs +++ b/sqlx-core/src/postgres/mod.rs @@ -8,7 +8,6 @@ mod error; mod io; mod listener; mod message; -mod migrate; mod options; mod row; mod transaction; @@ -16,6 +15,9 @@ mod type_info; pub mod types; mod value; +#[cfg(feature = "migrate")] +mod migrate; + pub use arguments::{PgArgumentBuffer, PgArguments}; pub use column::PgColumn; pub use connection::PgConnection;