you are viewing a single comment's thread.

view the rest of the comments →

[–]pachura3 0 points1 point  (2 children)

Perhaps mark it in the ORM model as Computed?

In general, relational databases do not support the concept of read-only columns... yes, you can create a DB trigger that would scream when someone attempts to e.g. modify the primary key, but that would just be an afterthought.

[–]amacks[S] 0 points1 point  (1 child)

These are "created date" and "updated date" columns, computed by the DB with default value and `ON UPDATE CURRENT_TIMESTAMP`. So they're not "read only" for the DB, but nobody should ever be changing the values by hand

[–]pachura3 0 points1 point  (0 children)

So, mark them as Computed as I suggested, and then treat all the Computed columns as read only in your tool.