feat(rfid): added tables to the db for tags and readers

This commit is contained in:
2025-03-14 07:34:12 -05:00
parent bb1635a5b4
commit dc04d97229
4 changed files with 1063 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
CREATE TABLE "rfidReaders" (
"rfidReader_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"reader" text,
"readerIP" text,
"lastHeartBeat" timestamp DEFAULT now()
);
--> statement-breakpoint
CREATE TABLE "rfidTags" (
"rfidTag_id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"tagHex" text,
"tag" text,
"timeStamp" timestamp DEFAULT now(),
"counts" jsonb NOT NULL,
"lastareaIn" text NOT NULL,
"runningNumber" numeric NOT NULL,
"created_at" timestamp DEFAULT now()
);
--> statement-breakpoint
CREATE UNIQUE INDEX "reader" ON "rfidReaders" USING btree ("reader");--> statement-breakpoint
CREATE UNIQUE INDEX "tagHex" ON "rfidTags" USING btree ("tagHex");

File diff suppressed because it is too large Load Diff

View File

@@ -106,6 +106,13 @@
"when": 1741892067501,
"tag": "0014_illegal_thundra",
"breakpoints": true
},
{
"idx": 15,
"version": "7",
"when": 1741952150913,
"tag": "0015_wonderful_lady_vermin",
"breakpoints": true
}
]
}