Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
ce0a0d8
Address Clippy lints and update CI (#315)
jxs Mar 1, 2024
e49eb1f
Bump rusqlite version (#317)
rjkz808 Mar 2, 2024
83c8cba
Dynamic migration dicovery, bug fix (#313)
alfred-hodler Mar 3, 2024
7e922af
Make the relative link to examples work from the refinery folder (#318)
htmfilho Mar 5, 2024
1e2411c
fix newline handling for Windows in database configuration setup (#320)
nikolaevx Mar 11, 2024
9672719
make public (#321)
wseaton Mar 27, 2024
135acc8
Migration enums (#312)
superstator Mar 28, 2024
a20120a
general: release 0.8.13 (#322)
jxs Mar 29, 2024
eff4fc2
general: release 0.8.14 (#324)
jxs Apr 3, 2024
4238781
fix CHANGELOG entries (#326)
jxs Apr 5, 2024
ff1c5c0
add MySQL 0.34 support (#327)
oscartbeaumont May 2, 2024
a2d6a61
add serde subfeature to tiberius-config (#334)
jxs May 21, 2024
74d066f
Allow Postgres tests to be run on a different database (#329)
mpalmer May 21, 2024
005df13
Enable math functions for SQLite (#335)
Pamplemousse May 24, 2024
ba37279
fix misleading CLI arguments descriptions (#336)
solc42 Jun 7, 2024
394f0f8
update dependencies (#340)
serprex Jul 9, 2024
b09e3cf
update READAME.md (#342)
jxs Aug 2, 2024
068858e
update migrate Transaction and AsyncTransaction execute functions (#346)
jxs Aug 3, 2024
8e120f6
Support `rusqlite` 0.32.x (#347)
manuteleco Oct 10, 2024
481519b
README: add bb8 example (#356)
hughobrien Feb 3, 2025
541b83b
Support `rusqlite` 0.33.x (#361)
NeuralModder Feb 16, 2025
64b6589
fix tiberius tests (#364)
jxs Feb 18, 2025
154ffc8
Bump maximum mysql_async version (#359)
dkintheuk Feb 18, 2025
cbdece5
Make a query overridable. (#358)
masato-hi Feb 18, 2025
1c9e0ca
bump mysql dependency (#365)
jxs Feb 18, 2025
3df41df
cargo clippy (#366)
jxs Feb 18, 2025
a4a858c
cargo clippy (#367)
jxs Feb 18, 2025
042124e
release 0.8.15 (#368)
jxs Feb 18, 2025
936af4c
feat: enable LTO and codegen-units = 1 optimizations (#369)
Feb 20, 2025
c8b9b6a
revert Transaction and AsyncTransaction function signatures update (#…
jxs Feb 21, 2025
a57ebb9
prepare 0.8.16 (#371)
jxs Feb 21, 2025
ed1fbcf
thiserror 2 (#372)
serprex Mar 14, 2025
1dba8ef
Add implementation note to readme (#376)
JonasFocke01 Mar 16, 2025
2187a03
Support rusqlite 0.34.x (#377)
jfhbrook Apr 10, 2025
c5cd69e
Update msrv (#362)
jxs Apr 12, 2025
3fa178f
Support rusqlite 0.35.x (#380) (#381)
kriswuollett May 2, 2025
12e58d0
Support rusqlite 0.37.x (#389) (#390)
kriswuollett Jul 20, 2025
057ef74
fix logging output for async and sync migrate functions (#378)
BentEngbers Jul 20, 2025
967f98e
Add support for TLS in postgres/tokio-postgres using native-tls (#353)
hugocasa Jul 25, 2025
bec7d22
Support int8 migration versions via new int8-versions feature (#330)
mpalmer Jul 25, 2025
d3fdf34
cargo clippy (#392)
jxs Jul 26, 2025
b7c8d44
update migrate Transaction and AsyncTransaction (#393)
jxs Jul 26, 2025
825a980
feat: derive Serialize for Migration if serde is enabled (#395)
MarkusWendorf Oct 6, 2025
6c9a90b
support mysq_async 0.36 (#400)
jxs Oct 6, 2025
edab9fe
update MSRV (#401)
jxs Oct 6, 2025
dc4296c
chore: fix unused warnings (#403)
jxs Oct 8, 2025
572a1f5
prepare 0.9.0 (#402)
jxs Oct 10, 2025
7425fb5
replace cargo audit with cargo deny (#404)
jxs Oct 10, 2025
9873313
version Cargo.lock (#405)
jxs Oct 13, 2025
3abf61e
Support rusqlite 0.38.x (#410)
NeuralModder Feb 11, 2026
8f0f9d3
Allow disabling Config for postgres and tokio-postgres (#408)
asonix Mar 25, 2026
01b1973
update deps to address cargo-deny (#418)
jxs Mar 25, 2026
1a75c69
add action to close stale issues and PRs (#419)
jxs Mar 27, 2026
87092c9
address assert_cmd::cargo_bin deprecation (#420)
jxs Mar 29, 2026
ff809c8
do not log warning on nested dirs when finding migrations (#421)
jxs Mar 29, 2026
c4f819b
Bump rand from 0.9.2 to 0.9.4 (#422)
dependabot[bot] Apr 15, 2026
fc7848f
Bump openssl from 0.10.73 to 0.10.78 (#427)
dependabot[bot] Apr 24, 2026
f4b23ea
chore: Support rusqlite 0.39.x (#425)
tomasol Apr 24, 2026
6074795
Allow running `tokio-postgres` with `rustls` (#426)
tomasol Apr 27, 2026
14354f5
fix (#430)
MariaChrysafis May 14, 2026
458951a
Bump openssl from 0.10.78 to 0.10.80 (#432)
dependabot[bot] May 29, 2026
d6ba618
backport 0.9.1 (#423) (#434)
jxs Jun 9, 2026
46721b3
Bump mysql to 0.28.x and mysql_async to 0.37.x (#436)
jxs Jun 9, 2026
bc1a829
Prepare 0.9.2 (#437)
jxs Jun 10, 2026
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
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[env]
LIBSQLITE3_FLAGS = { value = "-DSQLITE_ENABLE_MATH_FUNCTIONS", force = true }
2 changes: 1 addition & 1 deletion .github/workflows/cargo-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup toolchain
- uses: actions-rs/toolchain@v1
uses: actions-rs/toolchain@v1
with:
toolchain: stable

Expand Down
115 changes: 68 additions & 47 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ jobs:
name: CI is green
runs-on: ubuntu-latest
needs:
- cargo-fmt-clippy-and-test-macros-and-cli
- cargo-fmt-clippy
- test-macros-and-cli
- test-sqlite
- test-postgres
- test-tokio-postgres
Expand All @@ -17,35 +18,59 @@ jobs:
steps:
- run: exit 0

cargo-fmt-clippy-and-test-macros-and-cli:
name: Cargo fmt/clippy/test-macros-and-cli
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
rust: [stable, nightly, 1.56.0]
set-rust-versions:
runs-on: ubuntu-latest
outputs:
versions: ${{ steps.set-versions.outputs.versions }}
steps:
- name: checkout repo
uses: actions/checkout@v2
- id: set-versions
run: |
MSRV=$(grep -oP 'rust-version\s*=\s*"\K[^"]+' ./Cargo.toml)
echo "versions=['stable', 'nightly', '$MSRV']" >> $GITHUB_OUTPUT

cargo-fmt-clippy:
name: Cargo fmt and clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
toolchain: beta
- run: rustup self update
- run: rustup component add clippy
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check
- run: cargo clippy --all-targets --all-features

test-macros-and-cli:
name: test-macros-and-cli
needs: set-rust-versions
strategy:
matrix:
rust: ${{ fromJson(needs.set-rust-versions.outputs.versions) }}
os: [windows-latest, ubuntu-latest]

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- run: rustup self update
- run: cd refinery_core && cargo test --all-features -- --test-threads 1
- run: cd refinery && cargo build --all-features
- run: cd refinery_macros && cargo clippy
- run: cd refinery_cli && cargo clippy
- run: cd refinery_macros && cargo test
- run: cd refinery_macros && cargo test --all-features
- run: cd refinery_cli && cargo test

test-sqlite:
name: Test Sqlite
needs: set-rust-versions
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.65.0]
matrix:
rust: ${{ fromJson(needs.set-rust-versions.outputs.versions) }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -56,10 +81,11 @@ jobs:

test-postgres:
name: Test postgres
needs: set-rust-versions
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
matrix:
rust: ${{ fromJson(needs.set-rust-versions.outputs.versions) }}
services:
postgres:
image: postgres:9.6.13-alpine
Expand All @@ -71,14 +97,16 @@ 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-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
runs-on: ubuntu-latest
needs: set-rust-versions
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
matrix:
rust: ${{ fromJson(needs.set-rust-versions.outputs.versions) }}
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6.13-alpine
Expand All @@ -89,14 +117,16 @@ 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
- run: cd refinery && cargo test --features tokio-postgres-rustls --test tokio_postgres -- --test-threads 1

test-mysql:
name: Test mysql
needs: set-rust-versions
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
matrix:
rust: ${{ fromJson(needs.set-rust-versions.outputs.versions) }}
services:
postgres:
image: mysql:latest
Expand All @@ -117,10 +147,11 @@ jobs:

test-mysql-async:
name: Test mysql-async
needs: set-rust-versions
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
matrix:
rust: ${{ fromJson(needs.set-rust-versions.outputs.versions) }}
services:
postgres:
image: mysql:latest
Expand All @@ -140,20 +171,17 @@ jobs:

test-tiberius:
name: Test tiberius
needs: set-rust-versions
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, nightly, 1.56.0]
services:
mssql:
image: mcr.microsoft.com/mssql/server:2017-latest
ports:
- 1433:1433
env:
ACCEPT_EULA: yes
SA_PASSWORD: Passw0rd
matrix:
rust: ${{ fromJson(needs.set-rust-versions.outputs.versions) }}
steps:
- uses: actions/checkout@v2
- uses: potatoqualitee/mssqlsuite@v1.8
with:
install: sqlengine, sqlpackage
sa-password: Passw0rd
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
Expand All @@ -173,17 +201,10 @@ jobs:
toolchain: stable
- run: cd refinery && cargo rustdoc --all-features -- -D rustdoc::broken_intra_doc_links

audit:
name: cargo-audit
cargo-deny:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install Rust
# actions-rs/audit seems to be unmaintained and it's output doesn't give interverted tree dependencies
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo install cargo-audit
- run: cargo audit
- uses: actions/checkout@v5
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check advisories bans licenses sources
17 changes: 17 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Close stale issues

on:
schedule:
- cron: '0 0 * * *' # runs daily at midnight

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v10
with:
days-before-stale: 30
days-before-close: 7
stale-issue-message: 'This issue has been automatically marked as stale due to inactivity.'
close-issue-message: 'Closing this issue due to prolonged inactivity.'
exempt-issue-labels: 'keep-open'
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@
# This is refinery specific things
Refinery.toml
target/
Cargo.lock
78 changes: 77 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,85 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.8.12] - 2024-01-22
## [0.9.2] - 2026-06-09
### Added
- Support for `rustls` as a TLS backend for `tokio-postgres` via the new `tokio-postgres-rustls` feature. [#426](https://github.com/rust-db/refinery/pull/426)
### Changed
- Make TLS opt-in for `postgres` and `tokio-postgres` features. The `postgres` and `tokio-postgres` features no longer pull in `native-tls` unconditionally. Use `postgres-tls` and `tokio-postgres-tls` features for TLS support. [#408](https://github.com/rust-db/refinery/pull/408)
- Support `rusqlite` 0.39.x. [#425](https://github.com/rust-db/refinery/pull/425)
- Support `mysql` up to 0.28.x and `mysql_async` up to 0.37.x. [#436](https://github.com/rust-db/refinery/pull/436)
- Update `toml` dependency to 1.1.2. [#430](https://github.com/rust-db/refinery/pull/430)

## [0.9.1] - 2026-04-15
### Changed
- Support `rusqlite` 0.38.x. [#410](https://github.com/rust-db/refinery/pull/410)
### Fixed
- Avoid warning logs for nested directories while scanning migrations. [#421](https://github.com/rust-db/refinery/pull/421)

## [0.9.0] - 2025-01-06
### Added
- Support for TLS in postgres/tokio-postgres using native-tls. [#353](https://github.com/rust-db/refinery/pull/353)
- Support for int8 migration versions via new `int8-versions` feature. [#330](https://github.com/rust-db/refinery/pull/330)
- Derive Serialize for Migration if serde is enabled. [#395](https://github.com/rust-db/refinery/pull/395)

### Changed
- Update migrate Transaction and AsyncTransaction execute functions to avoid double iteration. [#393](https://github.com/rust-db/refinery/pull/393)
- Update `mysql_async` to support up until version 0.36. [#400](https://github.com/rust-db/refinery/pull/400)
- Update `rusqlite` to support up until version 0.37. [#389](https://github.com/rust-db/refinery/pull/389), [#390](https://github.com/rust-db/refinery/pull/390)
- Update `thiserror` to version 2. [#372](https://github.com/rust-db/refinery/pull/372)
- Update MSRV (Minimum Supported Rust Version). [#401](https://github.com/rust-db/refinery/pull/401), [#362](https://github.com/rust-db/refinery/pull/362)
- Fix unused warnings [#403](https://github.com/rust-db/refinery/pull/401)


### Fixed
- Fix logging output for async and sync migrate functions. [#378](https://github.com/rust-db/refinery/pull/378)

## [0.8.16] - 2024-02-21
### Fixed
- Revert [#346](https://github.com/rust-db/refinery/pull/346) as it breaks Semver, save it for a minor release in the future.

## [0.8.15] - **YANKED** - 2024-02-18

### Added
- Make a query overridable. [#358](https://github.com/rust-db/refinery/pull/358)
- Enable math functions for SQLite. [#335](https://github.com/rust-db/refinery/pull/335)
- Add serde subfeature to tiberius-config. [#334](https://github.com/rust-db/refinery/pull/334)

### Changed
- Update `mysql` version to allow `26`, [#365](https://github.com/rust-db/refinery/pull/365)
- Update `mysql_async` to allow `0.35`, [#359](https://github.com/rust-db/refinery/pull/359)
- Update `rusqlite` to allow `0.33`, [#361](https://github.com/rust-db/refinery/pull/361)
- Update migrate Transaction and AsyncTransaction execute functions to avoid double iteration when calling migrate with the grouped option active. [#346](https://github.com/rust-db/refinery/pull/346)
- Update overall dependencies. [#340](https://github.com/rust-db/refinery/pull/340)

### Fixed
- Fix misleading CLI arguments descriptions [#336](https://github.com/rust-db/refinery/pull/336)


## [0.8.14] - 2024-04-03

### Added
- Add new utility function, `load_sql_migrations` that enables dynamic migration discovery where embedding is not desirable. [#313](https://github.com/rust-db/refinery/pull/313)
- Add an enum `EmbeddedMigration` with all the migrations applied, [#312](https://github.com/rust-db/refinery/pull/312)

### Changed
- Make serde, toml deps optional, [#310](https://github.com/rust-db/refinery/pull/310)
- Make `Migration::applied` `pub`, [#321](https://github.com/rust-db/refinery/pull/321)
- Update `rusqlite` to allow `0.31`, [#316](https://github.com/rust-db/refinery/pull/316)

### Fixed
- Fix bug in get_last_applied_migration when refinery's schema history table is not default, [#313](https://github.com/rust-db/refinery/pull/313)
- Fix newline handling for Windows in database configuration setup, [#320](https://github.com/rust-db/refinery/pull/320)

## [0.8.13] - 2024-03-29

- YANKED: due to release mismatch, see [#323](https://github.com/rust-db/refinery/issues/323).

## [0.8.12] - 2024-01-22
### Added
- Add Iterable method, [#296](https://github.com/rust-db/refinery/pull/296)

### Changed
- Update `mysql` to allow `24`, [#292](https://github.com/rust-db/refinery/pull/292)
- Update `mysql_async` to allow `0.33`, [#292](https://github.com/rust-db/refinery/pull/292)
- Update `rusqlite` to allow `0.30`, [#300](https://github.com/rust-db/refinery/pull/300)
Expand Down
Loading