What's Changed
Fixed
- Ecto store: boolean gate
put/2now deletes any existing boolean row before inserting, regardless of the storedtargetvalue. Migrating from FunWithFlags (which usedtarget = "boolean") left a stale row alongside Bandera'starget = "_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 runmix 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