Closed dilizarov closed 4 years ago
Hi,
Thanks for reporting this! It has already been reported before, so I am going to close this as a duplicate of https://github.com/prisma/prisma/issues/2371
I have posted your proposal there.
any updates on this?
Problem
All my models include some basic columns. I'd like to be able to simplify this normalized process in my workflow instead of copying these columns over for every model.
Suggested solution
Model extensions. Maybe something like this:
In the above, I created the idea of an abstract model which won't create a table in the database, and is made for the explicit purpose of extension.
Instead of
abstract model
, we could even call it anextension
to simplify parsing and keep it as a uniform single word.The User and Task models will have their respective DB tables include id, updatedAt and createdAt fields.
Alternatives
Aside from copy and pasting the Basics into every single model, I don't know of another way to achieve the above.