JacobLinCool / JacobLinCool/d1-manager
Error occurs when adding data with preset function values.
- Dominant language
- Svelte
- Stars
- 645
- Forks
- 335
- PR merge metrics
- No merged PRs in 30d
Description
I have set my data table with the following code:
`create_time TEXT DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ', 'now'))`
This is to automatically fill in the date when manually adding data.
At least that's how it works on the data table operation page in Cloudflare D1. However, when I tried to do the same in the program of this repository, it automatically filled in the text of the default function `strftime('%Y-%m-%dT%H:%M:%SZ', 'now')` itself.

Typically, it should work like this: automatically filling in the date when adding.

Contributor guide
No contributing guide indexed for this repository
Research direction
The issue does not name a file or test. Reproduce the problem by creating a table with the shown SQLite default expression and adding a record through the repository's data-table interface. Trace how column defaults are read and applied; done means function-valued defaults produce a generated timestamp rather than the expression text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100