我是学习laravel的Laracast视频,并使用Valentina 作为GUI查看数据库并使用mysql进行连接。我在linux上安装了composer和mariadb。因此,当我在一个空表中创建一个以created_at和updated_at作为列的新字段时,我使用了NOW(),期望它使用当前的时间戳。但它(瓦伦蒂娜演播室)
> " Error (1292) 22007: Incorrect datetime value: 'now()' for column 'created_at' at row 1"Ps:我看过mysql中与时间戳相关的其他答案,但我相信我可能遗漏了一些与Valentina命令有关的内容。
发布于 2018-07-11 10:46:23
请参阅链接,尽管对于created_at和updated_at,您只需使用$table->timestamps();
发布于 2018-07-11 10:33:30
将NOW()更改为CURRENT_TIMESTAMP()
https://stackoverflow.com/questions/51283215
复制相似问题