Skip to content

v0.4.0

Latest

Choose a tag to compare

@Ch4s3 Ch4s3 released this 01 Jun 21:08
bb1f662

What's Changed

Fixed

  • Ecto store: boolean gate put/2 now deletes any existing boolean row before inserting, regardless of the stored target value. Migrating from FunWithFlags (which used target = "boolean") left a stale row alongside Bandera's target = "_bandera_none" row — the upsert conflict key is (flag_name, gate_type, target) so the two sentinels didn't conflict. The symptom was a dashboard toggle that showed "on" while the summary showed "off", with the toggle appearing to do nothing.

Added

  • Bandera.Ecto.Migrations.fix_fun_with_flags_boolean_gates/0: one-time cleanup migration helper that normalises duplicate boolean gate rows left by a FunWithFlags-to-Bandera migration. Safe to run on a fully-migrated database.
  • mix bandera.gen.fix_fun_with_flags_migration: scaffolds the cleanup migration file in one command, then run mix ecto.migrate.

Upgrading

{:bandera, "~> 0.4.0"}

If you previously migrated from FunWithFlags, run the one-time cleanup:

mix bandera.gen.fix_fun_with_flags_migration
mix ecto.migrate

Full changelog: https://github.com/Ch4s3/bandera/blob/main/CHANGELOG.md