What is snowflake data type here?

here guild_id? has a snowflake data type. Can we write this in migration?
Then what will be in the schema?

Is there any alternative to this? Can we store uuid here instead?

2 Likes

I think this is really helpful here.

Also someone can checkout this

https://hexdocs.pm/exnowflake/readme.html

a snowflake (id) is a bigint so can be stored as such in postgres etc…

In this forum thread a few years back, I posted a postgres function to generate snowflake ids etc.

The thread is about using the Triplex multi-tenancy library. As part of that discussion, I posted a snowflake id solution for a multi-tenancy. You might find some of that of interest.

1 Like