gotelem/internal/db/migrations/5_add_packets_up.sql

14 lines
377 B
MySQL
Raw Normal View History

2024-02-28 07:07:28 +00:00
CREATE TABLE "packet_definitions" (
"name" TEXT NOT NULL,
"description" TEXT,
2024-02-28 07:08:28 +00:00
"id" INTEGER NOT NULL
2024-02-28 07:07:28 +00:00
);
CREATE TABLE "field_definitions" (
"name" TEXT NOT NULL,
"subname" TEXT, -- if the data type is a bitfield, we can use subname to identify the bit.
"packet_name" TEXT NOT NULL,
"type" TEXT NOT NULL,
FOREIGN KEY("packet_name") REFERENCES packet_definitions(name)
);