aschampion / schemer

A database schema migration library with DAG dependencies
Apache License 2.0
6 stars 4 forks source link

Allow use of user-defined error types in rusqlite migrations. #14

Closed nuttycom closed 2 years ago

nuttycom commented 2 years ago

This builds atop #13 to permit user-defined error types in rusqlite migrations. This is useful for migrations that may need to perform more complex operations that can fail in ways that don't fit correctly into rusqlite's error type.

aschampion commented 2 years ago

doctest failing, possibly due to a missing import.

The generic param and that this makes the rusqlite adapter more different from the postgres one aren't great, but I think it's a reasonable workaround since the underlying problem is that there isn't an ergonomic way for migrations or adapters to have application-specific errors as currently written.

I'm fine with merging and releasing as version 0.2 with the expectation I'll probably change error handling later in another breaking version.

nuttycom commented 2 years ago

Updated & rebased to fix the CI failures.

aschampion commented 2 years ago

Thanks @nuttycom! I'll publish 0.2 tomorrow.

nuttycom commented 2 years ago

Thanks @nuttycom! I'll publish 0.2 tomorrow.

Thank you!

aschampion commented 2 years ago

Published, let me know if you encounter any problems.