Closed
Conversation
Update schema so worker can run on the initial setup w/ command `wrangler d1 execute mails --file=schema.sql`
guo-yu
reviewed
Mar 31, 2026
Contributor
guo-yu
left a comment
There was a problem hiding this comment.
感谢修复!删掉多余的 ALTER TABLE 语句确实是对的,这些字段已经在 CREATE TABLE 里定义了。
不过建议保留 CREATE TABLE IF NOT EXISTS 和 CREATE INDEX IF NOT EXISTS,这样已有用户重复执行 schema.sql 时不会报错,更安全一些。只需要删掉那 6 行 ALTER TABLE ADD COLUMN 就够了。
方便的话帮忙调整一下?
Contributor
|
感谢提交!已经在 main 上直接修复了(809ac72),保留了 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update schema so worker can run on the initial setup w/ command
wrangler d1 execute mails --file=schema.sql