waline
waline copied to clipboard
💬 A Simple, Safe Comment System
### 问题描述 | Describe the bug docker默认配置基于sqlite数据库创建,createdAt和updatedAt在插入数据时无法使用默认值 如下图,期望值应该是时间格式,但是实际上却没有执行函数而是把它作为字符串插入了数据库。 ### 问题网站 | Website URL localhost ### 服务部署在哪里? | Where your waline deploy? Docker ### 数据存储在哪里?| Where your comment data store? SQLite
修复 #1272 问题出在think-model-abstract的parseData函数 [ref](https://github.com/thinkjs/think-model-abstract/blob/adb8ceb7a47aa6efc666b855e1a161a0f1f3f2dd/lib/schema.js#L56) 对于 `createdAt` 和 `updatedAt`,执行到此处时 `schema[key].default` 值为string类型的 `datetime('now', 'localtime')`,后续isFunction判断为假然后插入的时候就是`datetime('now', 'localtime')`而不是预期的时间了。 完全修起来比较麻烦要改think-model-abstract实现sqlite内置函数,可能会影响到thinkjs框架。这里取了个巧手动赋值一下日期。 修复前 修复后
This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more.[View this repository on the Mend.io Web Portal](https://developer.mend.io/github/walinejs/waline). ## Config Migration Needed - [ ]...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [node-fetch](https://togithub.com/node-fetch/node-fetch) | [`2.6.7` -> `3.2.10`](https://renovatebot.com/diffs/npm/node-fetch/2.6.7/3.2.10) | [](https://docs.renovatebot.com/merge-confidence/)...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [vite](https://togithub.com/vitejs/vite) | [`3.0.4` -> `3.0.5`](https://renovatebot.com/diffs/npm/vite/3.0.4/3.0.5) | [](https://docs.renovatebot.com/merge-confidence/)...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@typescript-eslint/eslint-plugin](https://togithub.com/typescript-eslint/typescript-eslint) | [`5.37.0` -> `5.38.0`](https://renovatebot.com/diffs/npm/@typescript-eslint%2feslint-plugin/5.37.0/5.38.0) | [](https://docs.renovatebot.com/merge-confidence/)...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pnpm](https://pnpm.io) ([source](https://togithub.com/pnpm/pnpm)) | [`7.8.0` -> `7.9.0`](https://renovatebot.com/diffs/npm/pnpm/7.8.0/7.9.0) |...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [vercel](https://vercel.com) ([source](https://togithub.com/vercel/vercel)) | [`27.3.7` -> `27.4.0`](https://renovatebot.com/diffs/npm/vercel/27.3.7/27.4.0) |...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [i18next](https://www.i18next.com) ([source](https://togithub.com/i18next/i18next)) | [`21.8.16` -> `21.9.0`](https://renovatebot.com/diffs/npm/i18next/21.8.16/21.9.0) |...
[](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [vuepress-theme-hope](https://togithub.com/vuepress-theme-hope/vuepress-theme-hope) | [`2.0.0-beta.87` -> `2.0.0-beta.90`](https://renovatebot.com/diffs/npm/vuepress-theme-hope/2.0.0-beta.87/2.0.0-beta.90) | [](https://docs.renovatebot.com/merge-confidence/)...