Skip to content

Commit

Permalink
Merge pull request #2 from zcash/initial-breaking-changes
Browse files Browse the repository at this point in the history
Initial breaking changes
  • Loading branch information
nuttycom authored Oct 15, 2024
2 parents 5994430 + a2552d0 commit 668f1ae
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 11 deletions.
6 changes: 6 additions & 0 deletions schemerz-postgres/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this library adheres to Rust's notion of
<!-- next-header -->
## [Unreleased]

### Changed
- **IMPORTANT BREAKING CHANGE**: `schemerz_postgres::PostgresAdapter::new` now
uses a default table name of `_schemerz` when the `table_name` argument is
`None`. If you were not setting this argument before and are migrating from
`schemer`, you will need to set `table_name` to `Some("_schemer".into())`.

## [0.190.0] - 2024-10-15
Initial release. The API is identical to `schemer-postgres 0.2.0`.

Expand Down
6 changes: 3 additions & 3 deletions schemerz-postgres/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl<'a> PostgresAdapter<'a> {
pub fn new(conn: &'a mut Client, table_name: Option<String>) -> PostgresAdapter<'a> {
PostgresAdapter {
conn,
migration_metadata_table: table_name.unwrap_or_else(|| "_schemer".into()),
migration_metadata_table: table_name.unwrap_or_else(|| "_schemerz".into()),
}
}

Expand Down Expand Up @@ -173,7 +173,7 @@ impl<'a> Adapter for PostgresAdapter<'a> {
mod tests {
use super::*;
use postgres::NoTls;
use schemerz::test_schemer_adapter;
use schemerz::test_schemerz_adapter;
use schemerz::testing::*;

impl PostgresMigration for TestMigration {}
Expand All @@ -196,7 +196,7 @@ mod tests {
adapter
}

test_schemer_adapter!(
test_schemerz_adapter!(
let mut conn = build_test_connection(),
build_test_adapter(&mut conn));
}
6 changes: 6 additions & 0 deletions schemerz-rusqlite/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this library adheres to Rust's notion of
<!-- next-header -->
## [Unreleased]

### Changed
- **IMPORTANT BREAKING CHANGE**: `schemerz_rusqlite::RusqliteAdapter::new` now
uses a default table name of `_schemerz` when the `table_name` argument is
`None`. If you were not setting this argument before and are migrating from
`schemer`, you will need to set `table_name` to `Some("_schemer".into())`.

## [0.290.0] - 2024-10-15
Initial release. The API is identical to `schemer-rusqlite 0.2.2`.

Expand Down
6 changes: 3 additions & 3 deletions schemerz-rusqlite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl<'a, E> RusqliteAdapter<'a, E> {
pub fn new(conn: &'a mut Connection, table_name: Option<String>) -> RusqliteAdapter<'a, E> {
RusqliteAdapter {
conn,
migration_metadata_table: table_name.unwrap_or_else(|| "_schemer".into()),
migration_metadata_table: table_name.unwrap_or_else(|| "_schemerz".into()),
_err: PhantomData,
}
}
Expand Down Expand Up @@ -194,7 +194,7 @@ impl<'a, E: From<RusqliteError> + Sync + Send + Error + 'static> Adapter
mod tests {
use super::*;
use rusqlite::Error as RusqliteError;
use schemerz::test_schemer_adapter;
use schemerz::test_schemerz_adapter;
use schemerz::testing::*;

impl RusqliteMigration for TestMigration {
Expand All @@ -217,7 +217,7 @@ mod tests {
adapter
}

test_schemer_adapter!(
test_schemerz_adapter!(
let mut conn = build_test_connection(),
build_test_adapter(&mut conn));
}
6 changes: 6 additions & 0 deletions schemerz/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this library adheres to Rust's notion of
<!-- next-header -->
## [Unreleased]

### Added
- `schemerz::test_schemerz_adapter`

### Removed
- `schemerz::test_schemer_adapter` (use `test_schemerz_adapter` instead).

## [0.1.0] - 2024-10-15
Initial release. The API is identical to `schemer 0.2.1`.

Expand Down
2 changes: 1 addition & 1 deletion schemerz/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,5 +403,5 @@ pub mod tests {
}
}

test_schemer_adapter!(DefaultTestAdapter::new());
test_schemerz_adapter!(DefaultTestAdapter::new());
}
8 changes: 4 additions & 4 deletions schemerz/src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ impl Migration for TestMigration {
/// MyAdapterType {}
/// }
///
/// test_schemer_adapter!(construct_my_adapter_test_fixture());
/// test_schemerz_adapter!(construct_my_adapter_test_fixture());
/// ```
#[macro_export]
macro_rules! test_schemer_adapter {
macro_rules! test_schemerz_adapter {
($constructor:expr) => {
test_schemer_adapter!({}, $constructor);
test_schemerz_adapter!({}, $constructor);
};
($setup:stmt, $constructor:expr) => {
test_schemer_adapter!($setup, $constructor,
test_schemerz_adapter!($setup, $constructor,
test_single_migration,
test_migration_chain,
test_multi_component_dag,
Expand Down

0 comments on commit 668f1ae

Please sign in to comment.