gotelem/internal/db/migrations/5_add_packets_up.sql
saji a3f6e36cc4
All checks were successful
Go / build (push) Successful in 1m53s
didn't fix the actual error lol
2024-02-28 01:08:28 -06:00

14 lines
377 B
SQL

CREATE TABLE "packet_definitions" (
"name" TEXT NOT NULL,
"description" TEXT,
"id" INTEGER NOT NULL
);
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)
);