initial commit

This commit is contained in:
2025-04-06 22:30:23 +02:00
parent 34c5a8b84a
commit b9605e74c0
10 changed files with 300 additions and 0 deletions

11
incidents_submit.sql Normal file
View File

@@ -0,0 +1,11 @@
--Insert new incident or update existing one
INSERT INTO incident (title, description, estimated_duration, who_is_affected, date_time, severity, status )
VALUES (:Title, :Description, :EstimatedDuration, :WhoIsAffected, :DateTime, :Severity, :Status );
INSERT INTO incident_application (incident_id, application_id)
SELECT last_insert_rowid(),
CAST(application.value AS INTEGER)
FROM json_each(:Applications) as application
WHERE application.value IS NOT NULL;
SELECT 'redirect' AS component, 'incidents.sql?id=' || last_insert_rowid() AS link;