initial commit
This commit is contained in:
11
incidents_submit.sql
Normal file
11
incidents_submit.sql
Normal 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;
|
||||
Reference in New Issue
Block a user