Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial breaking changes #2

Merged
merged 2 commits into from
Oct 15, 2024
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
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())`.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were the only public dependent on schemer, so I think this notice should be all we need to do. But an alternative would be to remove the default and require the caller to always specify the table name.


## [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
Loading