Repository navigation
Tags
Tags
v0.4.0: Never-expiring invitations and migration fixes (#9) ### Added - **Invitation Expiration/Extension System**: Added ability to extend, set, or remove expiration dates from invitations - New API functions: - `Usher.extend_invitation_expiration/2` - Extend existing invitation expiration by given duration - `Usher.set_invitation_expiration/2` - Set specific expiration DateTime for an invitation - `Usher.remove_invitation_expiration/1` - Remove expiration to make an invitation never expire - Database migration `Usher.Migrations.V04` to make `expires_at` column nullable ### Changed - `Usher.Invitation` schema now allows `nil` for `expires_at` field to support never-expiring invitations - `Usher.validate_invitation_token/1` now treats invitations with `nil` `expires_at` as valid (never expire) ### Fixed - Migration "v03" now sets migration to version to "v02" when rolling back. Previously, it did not set the version correctly. - `Usher.Migration` functions were not executing `down/1` functions correctly. This has been fixed to ensure proper rollback behavior. ### Removed - Removed deprecated `Usher.Migration.migrate_to_latest/1` function. Use `Usher.Migration.migrate_to_version/1` instead. Bumped version to 0.4.0
Add configurable name field and versioned migrations (#1) * Add configurable name field and versioned migrations - Add optional name field to invitations with configurable validation - Implement versioned migration system (v01, v02) for safe upgrades - Add per-function validation options (require_name: true/false) - Extend API with validate_invitation_token/2, create_invitation/2, change_invitation/3 - Name field is nullable in database to avoid breaking changes for existing users - Replace create_usher_invitations_table/1 with migrate_to_latest/1 - Add comprehensive development setup documentation - Include migration tests and name validation tests - Add CHANGELOG.md following Keep a Changelog format BREAKING CHANGE: create_usher_invitations_table/1 function removed. Use migrate_to_latest/1 instead. For existing installations, this provides automatic schema version detection and incremental migrations. * Refactor validation configuration and update related documentation - Introduced extensible validation configuration for invitations. - Updated README and CHANGELOG to reflect changes in validation structure. - Modified changeset functions to support optional name validation. - Enhanced tests to cover new validation logic and default behaviors.