Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions refinery/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,24 @@ edition = "2018"

[features]
default = ["toml"]
rusqlite-bundled = ["refinery-core/rusqlite-bundled"]
rusqlite = ["refinery-core/rusqlite"]
postgres = ["refinery-core/postgres"]
mysql = ["refinery-core/mysql"]
tokio-postgres = ["refinery-core/tokio-postgres"]
mysql_async = ["refinery-core/mysql_async"]
tiberius = ["refinery-core/tiberius"]
tiberius-config = ["refinery-core/tiberius", "refinery-core/tiberius-config"]
config = ["refinery-core/config"]
rusqlite-bundled = ["refinery-core/rusqlite-bundled", "config"]
rusqlite = ["refinery-core/rusqlite", "config"]
postgres = ["refinery-core/postgres", "config"]
postgres-no-tls = ["refinery-core/postgres-no-tls"]
mysql = ["refinery-core/mysql", "config"]
tokio-postgres = ["refinery-core/tokio-postgres", "config"]
tokio-postgres-no-tls = ["refinery-core/tokio-postgres-no-tls"]
mysql_async = ["refinery-core/mysql_async", "config"]
tiberius = ["refinery-core/tiberius", "config"]
tiberius-config = ["refinery-core/tiberius", "refinery-core/tiberius-config", "config"]
serde = ["refinery-core/serde"]
toml = ["refinery-core/toml"]
enums = ["refinery-macros/enums"]
int8-versions = ["refinery-core/int8-versions", "refinery-macros/int8-versions"]

[dependencies]
refinery-core = { version = "0.9.0", path = "../refinery_core" }
refinery-core = { version = "0.9.0", path = "../refinery_core", default-features = false }
refinery-macros = { version = "0.9.0", path = "../refinery_macros" }

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions refinery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ embedded::migrations::runner().run(&mut conn).unwrap();
for more examples refer to the [examples](https://github.com/rust-db/refinery/tree/master/examples)
*/

#[cfg(feature = "config")]
pub use refinery_core::config;
pub use refinery_core::{
error, load_sql_migrations, Error, Migration, Report, Runner, SchemaVersion, Target,
Expand Down
2 changes: 1 addition & 1 deletion refinery_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mssql = ["refinery-core/tiberius-config", "tokio"]
int8-versions = ["refinery-core/int8-versions"]

[dependencies]
refinery-core = { version = "0.9.0", path = "../refinery_core", default-features = false, features = ["toml"] }
refinery-core = { version = "0.9.0", path = "../refinery_core", default-features = false, features = ["toml", "config"] }
clap = { version = "4", features = ["derive"] }
human-panic = "2"
toml = "0.8"
Expand Down
18 changes: 12 additions & 6 deletions refinery_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,19 @@ edition = "2021"

[features]
default = []
mysql_async = ["dep:mysql_async"]
postgres = ["dep:postgres", "dep:postgres-native-tls", "dep:native-tls"]
rusqlite-bundled = ["rusqlite", "rusqlite/bundled"]
config = []
mysql_async = ["dep:mysql_async", "config"]
postgres = ["postgres-no-tls", "postgres-tls", "config"]
postgres-no-tls = ["dep:postgres"]
postgres-tls = ["dep:postgres-native-tls", "tls"]
rusqlite = ["dep:rusqlite", "config"]
rusqlite-bundled = ["rusqlite", "rusqlite/bundled", "config"]
serde = ["dep:serde", "time/serde"]
tiberius = ["dep:tiberius", "futures", "tokio", "tokio/net"]
tiberius-config = ["tiberius", "tokio", "tokio-util", "serde"]
tokio-postgres = ["dep:postgres-native-tls", "dep:native-tls", "dep:tokio-postgres", "tokio", "tokio/rt"]
tiberius = ["dep:tiberius", "dep:futures", "dep:tokio", "tokio/net"]
tiberius-config = ["tiberius", "dep:tokio-util", "dep:serde", "config"]
tls = ["dep:native-tls"]
tokio-postgres = ["tokio-postgres-no-tls", "postgres-tls", "config"]
tokio-postgres-no-tls = ["dep:tokio-postgres", "dep:tokio", "tokio/rt"]
toml = ["serde", "dep:toml"]
int8-versions = []

Expand Down
5 changes: 3 additions & 2 deletions refinery_core/src/drivers/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#[cfg(feature = "rusqlite")]
pub mod rusqlite;

#[cfg(feature = "tokio-postgres")]
#[cfg(feature = "tokio-postgres-no-tls")]
pub mod tokio_postgres;

#[cfg(feature = "mysql_async")]
pub mod mysql_async;

#[cfg(feature = "postgres")]
#[cfg(feature = "postgres-no-tls")]
pub mod postgres;

#[cfg(feature = "mysql")]
Expand All @@ -16,4 +16,5 @@ pub mod mysql;
#[cfg(feature = "tiberius")]
pub mod tiberius;

#[cfg(feature = "config")]
mod config;
5 changes: 3 additions & 2 deletions refinery_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[cfg(feature = "config")]
pub mod config;
mod drivers;
pub mod error;
Expand All @@ -16,13 +17,13 @@ pub use crate::util::{
#[cfg(feature = "rusqlite")]
pub use rusqlite;

#[cfg(feature = "postgres")]
#[cfg(feature = "postgres-no-tls")]
pub use postgres;

#[cfg(feature = "mysql")]
pub use mysql;

#[cfg(feature = "tokio-postgres")]
#[cfg(feature = "tokio-postgres-no-tls")]
pub use tokio_postgres;

#[cfg(feature = "mysql_async")]
Expand Down
Loading