Replies: 1 comment
|
So, it looks like we can use Mito to create tables without an ID column with: (:auto-pk nil) So a basic Mito datamodel without a primary key ID column might look like: This means that we can probably just tell Mito to not create a primary key column automatically, create an arbitrarily named column and use that as the primary key if we wanted to. However, after reviewing my datamodel I will just use the default ID column as a primary key to maintain semantic uniformity with everything in the ecosystem. Lastly, the Class Definitions section of the Mito Readme is really interesting as it exposes additional functionality. Link: https://github.com/fukamachi/mito?tab=readme-ov-file#class-definitions |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Mito creates a default ID column in every table as it should and everything works great. I am testing an approach that uses slightly unusual naming schemes for columns which includes changing the default name of the auto incremented ID column to something different.
I can modify the ID table name just fine and Mito writes to tables with modified ID column names just fine. However, whenever I recompile my source file Mito re-name the column back to ID.
Does Mito have a feature to allow for customizing the name of the ID column?
Thanks.
All reactions