Open BlinkyStitt opened 1 year ago
re UUIDs: https://www.sea-ql.org/SeaORM/docs/next/generate-entity/entity-structure/#active-model-behavior
The official docs give an example of creating the UUID in an ActiveModel hook. I think we will want these hooks for created_at/updated_at. We could make our ULID at the same time.
I noticed that .big_unsigned()
(u64) is not the same as .big_int().unsigned()` (u32), so be careful of that too
Current status
Some places we use "bigint unsigned" and others we use "int".
Option 1: Short term fix
Option 2: Medium term fix
Long term fix
In the past, I had issues with getting sea-orm to use UUID primary key columns (since they can't be autoincrement and defaults were awkward). So I just gave up and used ints to unblock.
I think it's fine for us to generate a ULID in web3-proxy instead of relying on the database to default. But that doesn't help us with all the existing columns. This will likely require a multi-step migration: