rust-db/refinery

Make `Migration::applied` public

Protryon opened this issue · 2 comments

In order to implement AsyncMigrate for a custom SQL target, this function is needed to construct Migration types. This is specifically required by the AsyncQuery::query function.

At the moment, this API is pub(crate), requiring an unsafe transmute to construct any Migration type outside of refinery-core crate.

See example in klickhouse crate: https://github.com/Protryon/klickhouse/blob/master/klickhouse/src/migrate.rs#L58

jxs commented

Hi, and thanks for your interest!
Wouldn't you prefer to have refinery support Clickhouse directly?

@jxs Sure, it was simply more expedient for my immediate needs to implement it outside. It's also a bit hacky IMO. I can open a PR here to add support.