- The
prefixoption can be used to set the prefix on Ecto fields that are not primary keys or foreign keys. (#39, @lurodrigo)
- allow binary type by @dnsbty in #32
- Fix prefix validation in Ecto type by @andrewtimberlake in #35
- Change default type to uuid by @andrewtimberlake in #34
Full Changelog: https://github.com/sloanelybutsurely/typeid-elixir/compare/0.6.0...1.0.0
- raises if
prefixis not given whenprimary_key: true
Ecto.ParameterizedTypeimplementation traverses associations so prefixes only need to be defined on schema primary keysEcto.ParameterizedTypeimplementationtypeoption can be set globally with adefault_typeApplication configuration
- Implements
Jason.Encoderprotocol - BREAKING: The
_seperator is no longer encoded as a binary when returned byTypeID.to_iodata/1or protocols that use that function. This is unlikely to matter unless you are pattern matching on the shape of the returned iodata.
- Implements
String.Charsprotocol - Implements
Phoenix.HTML.Safeprotocol - Implements
Phoenix.Paramprotocol
- BREAKING:
type/1has been renamed toprefix/1 Ecto.ParameterizedTypeimplementationnew/2now accepts an optional keyword list to specify the UUIDtime:in unix milliseconds
iex> TypeID.new("test", time: 0)
#TypeID<"test_0000000000fq893mf5039xea5j">- Lower required Elixir version
- Include CHANGELOG in docs
- Remove dependency on
Uniq
Validate against 0.2.0 spec
Validate against 0.1.0 spec
Initial release