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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
- run: cargo install --path ./refinery_cli --no-default-features --features=postgresql
- run: cd refinery && cargo test --features postgres --test postgres -- --test-threads 1
- run: cd refinery && cargo test --features postgres,int8-versions --test postgres -- --test-threads 1
- run: cd refinery && cargo test --features postgres-tls --test postgres -- --test-threads 1
- run: cd refinery && cargo test --features postgres-tls,int8-versions --test postgres -- --test-threads 1

test-tokio-postgres:
name: Test tokio-postgres
Expand All @@ -117,7 +117,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- run: cd refinery && cargo test --features tokio-postgres --test tokio_postgres -- --test-threads 1
- run: cd refinery && cargo test --features tokio-postgres-tls --test tokio_postgres -- --test-threads 1

test-mysql:
name: Test mysql
Expand Down
17 changes: 10 additions & 7 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"]
config = ["refinery-core/config"]
rusqlite-bundled = ["refinery-core/rusqlite-bundled", "config"]
rusqlite = ["refinery-core/rusqlite", "config"]
postgres-tls = ["refinery-core/postgres-tls", "config"]
postgres = ["refinery-core/postgres"]
mysql = ["refinery-core/mysql"]
mysql = ["refinery-core/mysql", "config"]
tokio-postgres-tls = ["refinery-core/tokio-postgres-tls", "config"]
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"]
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
4 changes: 2 additions & 2 deletions refinery_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ path = "src/main.rs"

[features]
default = ["mysql", "postgresql", "sqlite-bundled", "mssql"]
postgresql = ["refinery-core/postgres"]
postgresql = ["refinery-core/postgres-tls"]
mysql = ["refinery-core/mysql"]
sqlite = ["refinery-core/rusqlite"]
sqlite-bundled = ["sqlite", "refinery-core/rusqlite-bundled"]
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
17 changes: 11 additions & 6 deletions refinery_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ 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 = [ "dep:postgres" ]
postgres-tls = ["postgres", "dep:postgres-native-tls", "tls", "config"]
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 = ["dep:tokio-postgres", "dep:tokio", "tokio/rt"]
tokio-postgres-tls = ["tokio-postgres", "postgres-tls", "config"]
toml = ["serde", "dep:toml"]
int8-versions = []

Expand Down
1 change: 1 addition & 0 deletions refinery_core/src/drivers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ pub mod mysql;
#[cfg(feature = "tiberius")]
pub mod tiberius;

#[cfg(feature = "config")]
mod config;
1 change: 1 addition & 0 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 Down
Loading