Skip to content

Update schema.sql#10

Closed
AmagiDDmxh wants to merge 1 commit intochekusu:mainfrom
AmagiDDmxh:patch-1
Closed

Update schema.sql#10
AmagiDDmxh wants to merge 1 commit intochekusu:mainfrom
AmagiDDmxh:patch-1

Conversation

@AmagiDDmxh
Copy link
Copy Markdown

Update schema so worker can run on the initial setup w/ command wrangler d1 execute mails --file=schema.sql

Update schema so worker can run on the initial setup w/ command `wrangler d1 execute mails --file=schema.sql`
Copy link
Copy Markdown
Contributor

@guo-yu guo-yu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢修复!删掉多余的 ALTER TABLE 语句确实是对的,这些字段已经在 CREATE TABLE 里定义了。

不过建议保留 CREATE TABLE IF NOT EXISTSCREATE INDEX IF NOT EXISTS,这样已有用户重复执行 schema.sql 时不会报错,更安全一些。只需要删掉那 6 行 ALTER TABLE ADD COLUMN 就够了。

方便的话帮忙调整一下?

@guo-yu
Copy link
Copy Markdown
Contributor

guo-yu commented Mar 31, 2026

感谢提交!已经在 main 上直接修复了(809ac72),保留了 IF NOT EXISTS 同时删掉了多余的 ALTER TABLE 语句。

@guo-yu guo-yu closed this Mar 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants