Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupt sql generated when bulk_create method is configured with on_conflict parameter #1568

Open
zzl221000 opened this issue Mar 12, 2024 · 0 comments

Comments

@zzl221000
Copy link

Describe the bug

In the sqlite engine, configuring update_fields will configure on_conflict for self.insert_query and self.insert_query_all, resulting in duplicate on conflict fields.

'INSERT INTO "fileevent" ("id","tn","date","url","status","create_at") VALUES (?,?,?,?,?,?) ON CONFLICT ("id", "id") DO UPDATE SET "url"=EXCLUDED."url","url"=EXCLUDED."url"'

To Reproduce
sqlite3 and use bulk api

Expected behavior

'INSERT INTO "fileevent" ("id","tn","date","url","status","create_at") VALUES (?,?,?,?,?,?) ON CONFLICT ("id") DO UPDATE SET "url"=EXCLUDED."url","url"=EXCLUDED."url"'

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

No branches or pull requests

1 participant