SimpleCloudNotifier/scnserver/db/schema/requests_1.ddl

48 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

CREATE TABLE `requests`
(
request_id TEXT NOT NULL,
2023-01-13 17:17:17 +01:00
method TEXT NOT NULL,
uri TEXT NOT NULL,
user_agent TEXT NULL,
authentication TEXT NULL,
request_body TEXT NULL,
request_body_size INTEGER NOT NULL,
request_content_type TEXT NOT NULL,
remote_ip TEXT NOT NULL,
2023-05-27 23:54:14 +02:00
key_id TEXT NULL,
2023-01-13 17:17:17 +01:00
userid TEXT NULL,
permissions TEXT NULL,
response_statuscode INTEGER NULL,
response_body_size INTEGER NULL,
2023-01-13 17:17:17 +01:00
response_body TEXT NULL,
response_content_type TEXT NOT NULL,
processing_time INTEGER NOT NULL,
retry_count INTEGER NOT NULL,
panicked INTEGER CHECK(panicked IN (0, 1)) NOT NULL,
panic_str TEXT NULL,
timestamp_created INTEGER NOT NULL,
timestamp_start INTEGER NOT NULL,
timestamp_finish INTEGER NOT NULL,
PRIMARY KEY (request_id)
) STRICT;
CREATE TABLE `meta`
(
meta_key TEXT NOT NULL,
value_int INTEGER NULL,
value_txt TEXT NULL,
value_real REAL NULL,
value_blob BLOB NULL,
PRIMARY KEY (meta_key)
) STRICT;
INSERT INTO meta (meta_key, value_int) VALUES ('schema', 1)