Disable timestamps in migration and query automated in v4 #1622
Unanswered
the-prodigy
asked this question in
Help
Replies: 1 comment 3 replies
-
Use class inheritance by creating a base model? class BaseModel extends Model {
static get createdAtColumn () {
return null;
}
static get updatedAtColumn () {
return null;
}
} And then other models can extend your base model const BaseModel = use('App/Models/BaseModel')
class User extends BaseModel {} |
Beta Was this translation helpful? Give feedback.
3 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.
-
Hi!
How can I disable to insert timestamps by default like at migration part and query part?
There is a solution that disables it:
But then I have to paste that part into every model I create. How can I automate this?
Beta Was this translation helpful? Give feedback.
All reactions