-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update existing cmd on conflict
When adding a new command, and the command in fact already exists, thus, it's an update, replace the content of the command instead of failing.
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
INSERT INTO custom_commands (source, name, content) VALUES (?, ?, ?); | ||
INSERT INTO custom_commands (source, name, content) VALUES (?, ?, ?) | ||
ON CONFLICT (source, name) DO UPDATE SET content = excluded.content; |
This file contains 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