Skip to content
Merged
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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ Year format is defined as: `YYYY-m-d`

## [Unreleased]

## [0.4.1 - 2023 - 04 - 23
## [0.4.2 - 2023 - 05 - 02]

### Bugfix

Fixed a bug related to migrations that prevented compiling if features were not specified.

## [0.4.1 - 2023 - 04 - 23]

### Feature

Expand Down
12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ tokio-postgres = { workspace = true, optional = true }
tiberius = { workspace = true, optional = true }

[workspace.dependencies]
canyon_crud = { version = "0.4.1", path = "canyon_crud" }
canyon_connection = { version = "0.4.1", path = "canyon_connection" }
canyon_entities = { version = "0.4.1", path = "canyon_entities" }
canyon_migrations = { version = "0.4.1", path = "canyon_migrations"}
canyon_macros = { version = "0.4.1", path = "canyon_macros" }
canyon_crud = { version = "0.4.2", path = "canyon_crud" }
canyon_connection = { version = "0.4.2", path = "canyon_connection" }
canyon_entities = { version = "0.4.2", path = "canyon_entities" }
canyon_migrations = { version = "0.4.2", path = "canyon_migrations"}
canyon_macros = { version = "0.4.2", path = "canyon_macros" }

tokio = { version = "1.27.0", features = ["full"] }
tokio-util = { version = "0.7.4", features = ["compat"] }
Expand All @@ -61,7 +61,7 @@ quote = "1.0.9"
proc-macro2 = "1.0.27"

[workspace.package]
version = "0.4.1"
version = "0.4.2"
edition = "2021"
authors = ["Alex Vergara<[email protected]>, Gonzalo Busto Musi<[email protected]>"]
documentation = "https://zerodaycode.github.io/canyon-book/"
Expand Down
2 changes: 1 addition & 1 deletion bash_aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# In order to run the script, simply type `$ . ./bash_aliases.sh` from the root of the project.
# (refreshing the current terminal session could be required)

# Executes the docker compose script to wake up the postgres container
# Executes the docker compose script to wake up the containers
alias DockerUp='docker-compose -f ./docker/docker-compose.yml up'
# Shutdown the postgres container
alias DockerDown='docker-compose -f ./docker/docker-compose.yml down'
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
extern crate canyon_connection;
extern crate canyon_crud;
extern crate canyon_macros;
#[cfg(feature = "migrations")]
extern crate canyon_migrations;

/// Reexported elements to the root of the public API
#[cfg(feature = "migrations")]
pub mod migrations {
pub use canyon_migrations::migrations::{handler, processor};
}
Expand Down
2 changes: 1 addition & 1 deletion tests/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub const PSQL_DS: &str = "postgres_docker";
#[cfg(feature = "mssql")]
pub const SQL_SERVER_DS: &str = "sqlserver_docker";

#[cfg(feature = "postgres")]
#[cfg(all(feature = "postgres", feature = "migrations"))]
pub static FETCH_PUBLIC_SCHEMA: &str =
"SELECT
gi.table_name,
Expand Down
9 changes: 5 additions & 4 deletions tests/migrations/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#![allow(unused_imports)]
///! Integration tests for the migrations feature of `Canyon-SQL`
use canyon_sql::{crud::Transaction, migrations::handler::Migrations};

use crate::constants;
///! Integration tests for the migrations feature of `Canyon-SQL`
use canyon_sql::crud::Transaction;
#[cfg(feature = "migrations")]
use canyon_sql::migrations::handler::Migrations;

/// Brings the information of the `PostgreSQL` requested schema
#[cfg(feature = "postgres")]
#[cfg(all(feature = "postgres", feature = "migrations"))]
#[canyon_sql::macros::canyon_tokio_test]
fn test_migrations_postgresql_status_query() {
let results = Migrations::query(constants::FETCH_PUBLIC_SCHEMA, [], constants::PSQL_DS).await;
Expand Down