Skip to content

Releases: Electron100/butane

0.8.1: dev dependency reference only by path (#375)

15 Jun 02:18
8336549
Compare
Choose a tag to compare

API Features

  • Support is_in check in filter!/query! (#351)
  • Allow any valid sqlite or pg connection string (#355)
  • Add Many.set (#357)
  • Allow Many.get after Many.delete (#356)
  • Add support for dates (#348)
  • impl PartialEq for AutoPk (#346)
  • Create a ConnectionSpec from a database URI (#344)
  • Add Backend.row_id_column (#329)

Library fixes & internal improvements

  • Improve the comment on DataObjectOps::save (#350)
  • Improve Many operation descriptions (#358)
  • [butane_test_helper] Enhancements to improve API & testing (#363)
  • Dependency updates
  • Remove direct use of once_cell (#362)
  • Use SQLite 3.35 DROP COLUMN (#340)
  • Fix quoting of table names in queries (#338)
  • [cli] return, not exit, from get_migrations (#335)

0.8

21 Apr 00:40
38bcdd2
Compare
Choose a tag to compare
0.8

The major feature in this release is async support. Turn it on using
the async feature. If you wish to use SQLite with async, you must
also enable async-adapter. Enabling pg automatically enables
async (but the Postgres backend may still be used with sync
methods, enabling async does not disable synchronous usage).

For more about async support, see the README

Breaking Changes

  • In order to allow sync and async code to look as similar as possible
    for types and traits which do not otherwise need separate sync and
    async variants, several "Ops" traits have been introduced which
    contain methods split off from prior types and traits and must now
    be imported explicitly if you are not using the prelude (use butane::prelude::* or use butane::prelude_async::*). The Ops
    traits are:

    • DataObjectOpsSync / DataObjectOpsAsync (for use with DataObject)
    • QueryOpsSync / QueryOpsAsync (for use with Query, less commonly needed directly if you use the query! or filter! macros)
    • ForeignKeyOpsSync / ForeignKeyOpsAsync (for use with ForeignKey)
    • ManyOpsSync / ManyOpsAsync (for use with Many)
  • The ConnectionManager struct has moved from butane::db::r2 to
    butane::db. It no longer implements ConnectionMethods as this was
    unnecessary due to Deref. The butane::db::r2 module is no longer
    public.

API Features

  • Impl Deref for AutoPk (#302)
  • Add deadpool support (#284)

Library fixes & internal improvements.

  • SQLite operates under strict mode (#320)
  • Use nanosecond granularity on sqlite timestamp cols (#316)
  • Dont rely on serde being in scope (#314)
  • Recognize more paths for String and Vec (#299)
  • Addressed new clippy lints
  • Dependency updates

0.7

18 Jul 01:28
8a1ea4f
Compare
Choose a tag to compare
0.7

We'd been too long without a public release, so there are a lot of changes here. Most of them are minor.

Breaking Changes

  • The #[auto] attribute is replaced with the AutoPk type.
  • Remove ObjectState and the auto-created state field for each model (#151)

API Features

Library fixes & internal improvements

  • Drop constraints before dropping tables (#253)
  • Clone includes ForeignKey value (#244)
  • [pg] Use ALTER TABLE instead of copies (#243)
  • Add equality of KnownId(t) and Known(t) (#234)
  • Add references when adding/changing pg columns (#239)
  • Avoid duplicate .table files (#225)
  • Prevent unnecessary whitespace in sqlite SQL (#221)
  • Create dir before lock to fix race condition in FsMigrations (#213)
  • Remove unused trait ModelTyped (#178)
  • Fix sqlite foreign key support (#177)
  • Use pretty json in .butane files (#175)
  • Improve DataObject.save() generation (#171)
  • Support BTreeMap for feature json (#164)
  • Add database constraints (#158)
  • Force stable ordering of migration operations (#155)
  • Add more flexibility in type path matching in proc macro (#123)
  • Upsert on save (#117)
  • Improve checking for unitialized values added to a Many (#116)
  • Quote reserved SQL words (#104)
  • Allow type serde_json::Value (#106)
  • Fixes for new lints and warnings (various)
  • Test expansion & improvements (various)
  • Improved docs and examples (various)
  • Improved logging (various)
  • Dependency updates (various)

CLI features & interface changes

  • Add desribe-migration command (#230)
  • unmigrate (instead of rollback) is the primary command for schema reverts. Rollback still works via alias. (#260)
  • Add --verbose flag (#205)
  • Add --no-connect flag to allow init without connecting (#195)
  • Add --path argument to set working directory (#130)
  • Add backend command for adding or removing backends from migrations (#198)
  • Add detach-migration command (see cli help for details) (#100)

CLI fixes & internal improvements

  • Add EOL at EOF for JSON files (#238)
  • Fix rollback when partially migrated (#200)
  • Use clap derive (#197)
  • Stabilise embed format (#161)
  • Find .butane in workspace (#98)
  • Use clap's error handling for invalid subcommand (#132)
  • Fix embed (#128)

0.6.1

29 May 12:58
2828363
Compare
Choose a tag to compare
  • Fix docs.rs build
  • use resolver 2

0.6

20 May 01:13
7615017
Compare
Choose a tag to compare
0.6
  • Add a butane clean command (#46)
  • More flexibility in accepting DateTime identifiers (#54)
  • Add #[derive(FieldType)] (#68)
  • Add missing Clone trait (#24)
  • Allow feature postgres without chrono (#36)
  • Add JSON support (#38)
  • Remove unused features of dependencies (#47)
  • Support HashMap with any value (#45)
  • Add Debug trait to all data structures (#55)
  • Support fake data (#57)
  • Make load_first respect order and offset(#34)
  • Reexposes r2d2::ManageConnection in r2 to prevent having to add r2d2 dependency directly to Cargo.toml (#35)
  • Fix issue with many to many relationship not respecting renamed tables (#59)
  • Updated to use Edition 2021
  • Test improvements
  • Dependency updates
  • Example improvements

Contributors to this release: John Vandenberg, James Oakley, João M. Martins

0.5.1

27 Dec 16:31
Compare
Choose a tag to compare
  • Add try_get to DataObject. This returns a Result<Option<T>> rather than Result<T>. When it's expected that the object may not exist, this leads to slightly better ergonomics.
  • Support Chrono DateTime<Utc> like NaiveDateTime

0.5

14 Nov 02:57
Compare
Choose a tag to compare
0.5
  • Many::add now returns a Result, which will indicate an error if used with an uninitialized primary key.
  • Dependency version updates and clippy bitrot
  • Cleanup improvements to Postgres tests

0.4.3

28 Oct 02:02
Compare
Choose a tag to compare

Add butane CLI commands clear and collapse

  • clear clears out all data from the database without affecting the schema
  • collapse collapses all (applied) migrations into a single new migration.

0.4.2

04 Oct 00:31
Compare
Choose a tag to compare
  • Add offset parameter to Query
  • Fix BoolExpr::In handling
  • Add Many::remove
  • Allow a ForeignKey to refer to the same type
  • Fix bug saving an object with an auto-pk and a Many field.

0.4.1

23 Jul 22:39
Compare
Choose a tag to compare

Add sqlite-bundled feature