Solutions

ERROR: Invalid default value for ‘created_at’ [solution]

I got a problem while adding a new column in the database as well as editing the column. The error says invalid default value for ‘created_at’

So I tried to do run this code in this code in the SQL.

SET sql_mode = '';

 

But It didnt work. So I tried the command allowing database to be installed

SET GLOBAL sql_mode = '';

 

And tried again. And it worked!!

jaminrai

Recent Posts

The Duck and the Tortoise: A Tale of Patience and Teamwork

In a serene forest by the edge of a sparkling lake, there lived a cheerful…

5 days ago

10 Smart Strategies for a Secure and Enjoyable Retirement

Retiring comfortably is a goal many aspire to achieve, and with the right strategies, it’s…

1 week ago

Troubleshooting a Slow Computer

Is your computer running frustratingly slow? Don't worry; you're not alone in facing this common…

1 week ago

The Clever Fox and the Greedy Crow

Once, in a sunny forest, Fox and Crow were friends. One day, Crow found a…

1 week ago

The Little Lantern and the Lost Stars

Once upon a time, in a cozy village nestled between rolling hills and whispering forests,…

1 week ago

The Lantern in the Storm

In a small village nestled between rolling hills and a winding river, there lived a…

1 week ago