gotelem/migrations/5_add_packets_up.sql
saji 4e6f8db7ed
All checks were successful
Go / build (1.21) (push) Successful in 1m16s
Go / build (1.22) (push) Successful in 1m15s
combine separate packages
2024-03-02 21:49:18 -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)
);