How to replace Ecto.Schema modifications?
So I have my custom ULID implementation. It takes UUID format as well as BASE64 url encoded and transforms it to UUID in database layer. When taking out of DB it's transformed to BASE64 again. It creates shorter URLs which is nice. With ecto I needed just 2 lines of code to have all database IDs in this format. But I don't know what's the best way to do it in ash.
Also I've modified timestamps to be utc_datetime_usec instead of naive datetime ones. It's easier to convert them to different timezones that way.
Here's the code:
All I needed to do then was to
In case anyone is interested into my ULID implementation here's gist https://gist.github.com/lamp-town-guy/306694cdb510bd93894c51bb1aaf917e
Also I've modified timestamps to be utc_datetime_usec instead of naive datetime ones. It's easier to convert them to different timezones that way.
Here's the code:
All I needed to do then was to
use App.Schema and it was done. Is there a similar way to do it in Ash? Or at least a way to add ULID in this convenient as a separate data type?In case anyone is interested into my ULID implementation here's gist https://gist.github.com/lamp-town-guy/306694cdb510bd93894c51bb1aaf917e

