From 62dae6011db94dd52c3ac0fce517c6e9cc0abcf6 Mon Sep 17 00:00:00 2001
From: Jonathan Bradley <jcb@pikum.xyz>
Date: Fri, 10 Oct 2025 17:07:45 -0400
Subject: pke-at: first-pass storage interface

---
 src/sql/setlist_song_upsert.sql | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 src/sql/setlist_song_upsert.sql

(limited to 'src/sql/setlist_song_upsert.sql')

diff --git a/src/sql/setlist_song_upsert.sql b/src/sql/setlist_song_upsert.sql
new file mode 100644
index 0000000..ec0682e
--- /dev/null
+++ b/src/sql/setlist_song_upsert.sql
@@ -0,0 +1,6 @@
+INSERT INTO [at_setlist_song] (setlist_uuid,song_uuid)
+	VALUES('%s','%s')
+		ON CONFLICT(setlist_uuid,song_uuid) DO UPDATE SET
+			is_deleted=0
+			,modification_dt=unixepoch('now')
+		WHERE setlist_uuid=excluded.setlist_uuid AND song_uuid=excluded.song_uuid;
-- 
cgit v1.2.3

