2023-07-06 02:16:12 +00:00
|
|
|
CREATE TABLE "bus_events" (
|
|
|
|
"ts" INTEGER NOT NULL, -- timestamp, unix milliseconds
|
|
|
|
"name" TEXT NOT NULL, -- name of base packet
|
|
|
|
"data" TEXT NOT NULL CHECK(json_valid(data)) -- JSON object describing the data, including index if any
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX "ids_timestamped" ON "bus_events" (
|
2024-02-12 15:45:23 +00:00
|
|
|
"name",
|
2023-07-06 02:16:12 +00:00
|
|
|
"ts" DESC
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE INDEX "times" ON "bus_events" (
|
|
|
|
"ts" DESC
|
2024-02-12 15:45:23 +00:00
|
|
|
);
|