-
Describe the bug | 问题描述
如上所示,从原来的leancloud迁移数据到TiDB数据库上,不管是自己写工具,还是通过waline工具导入,发现管理后台查看评论列表,发现时间都显示为 1970 年的日期,查看后台返回数据发现,里面的time字段是为NULL。 Website URL | 问题网站https://lisenhui.cn/flinks.html Where your waline deploy? | 服务部署在哪里?Vercel (Default) Where your comment data store? | 数据存储在哪里?TiDB Describe the bug | Problem description
As shown above, when migrating data from the original leancloud to the TiDB database, whether you write your own tool or import it through the waline tool, you can check the comment list in the management background and find that the time is displayed as a date of 1970. When you check the data returned in the background, you find that the time field in it is NULL. But the display in the comment area of the blog page is normal: Website URL | Problem websitehttps://lisenhui.cn/flinks.html Where your waline deploy? | Where is the service deployed?Vercel (Default) Where your comment data store? | Where is the data stored?TiDB |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
辛苦确认下是 postgresql 还是 tidb 存储,看你截图返回的字段 Please confirm whether it is stored in postgresql or tidb. The field |
Beta Was this translation helpful? Give feedback.
-
|
@lizheming 谢谢指出,对比了下字段名称发现,是之前 Query Warning.
(1681) Integer display width is deprecated and will be removed in a future release.; |
Beta Was this translation helpful? Give feedback.


辛苦确认下是 postgresql 还是 tidb 存储,看你截图返回的字段
insertedat是有问题的,正确的应该是insertedAt。time 的值是用insertedAt的值换算的时间错,所以导致 null 了。目前只有在 postgresql 中因为大小写转换的问题,会有insertedat字段,tidb 应该是不存在的。另外
@waline/client的版本有点古早了,可以更新到最新。Please confirm whether it is stored in postgresql or tidb. The field
insertedatreturned by your screenshot is problematic. The correct one should beinsertedAt. The value of time is the wrong time converted using the value ofinsertedAt, so it is null. Currently, only in postgresql due to case conversion issues, there will be aninsertedatfield, and tidb should not exist.In addition, the version of
@waline/clientis a bit old and can be updated to the latest one.