gotelem/internal/db/migrations/5_add_packets_up.sql
saji d6cd4d3e26
Some checks failed
Go / build (push) Failing after 1m45s
fix tests, add packets stuff for db
2024-02-28 01:07:36 -06:00

14 lines
378 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)
);