feat(readers): added in good and bad reads to monitor eff
This commit is contained in:
1
database/migrations/0068_last_caretaker.sql
Normal file
1
database/migrations/0068_last_caretaker.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "rfidTags" RENAME COLUMN "timeStamp" TO "lastRead";
|
||||||
2
database/migrations/0069_chemical_maximus.sql
Normal file
2
database/migrations/0069_chemical_maximus.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE "rfidReaders" ADD COLUMN "goodReads" integer DEFAULT 0;--> statement-breakpoint
|
||||||
|
ALTER TABLE "rfidReaders" ADD COLUMN "badReads" integer DEFAULT 0;
|
||||||
2166
database/migrations/meta/0068_snapshot.json
Normal file
2166
database/migrations/meta/0068_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
2180
database/migrations/meta/0069_snapshot.json
Normal file
2180
database/migrations/meta/0069_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -477,6 +477,20 @@
|
|||||||
"when": 1749744049457,
|
"when": 1749744049457,
|
||||||
"tag": "0067_shallow_trish_tilby",
|
"tag": "0067_shallow_trish_tilby",
|
||||||
"breakpoints": true
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 68,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1752195741709,
|
||||||
|
"tag": "0068_last_caretaker",
|
||||||
|
"breakpoints": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"idx": 69,
|
||||||
|
"version": "7",
|
||||||
|
"when": 1752195894698,
|
||||||
|
"tag": "0069_chemical_maximus",
|
||||||
|
"breakpoints": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@ import {
|
|||||||
uuid,
|
uuid,
|
||||||
uniqueIndex,
|
uniqueIndex,
|
||||||
jsonb,
|
jsonb,
|
||||||
|
integer,
|
||||||
} from "drizzle-orm/pg-core";
|
} from "drizzle-orm/pg-core";
|
||||||
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
|
import { createInsertSchema, createSelectSchema } from "drizzle-zod";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
@@ -23,6 +24,8 @@ export const rfidReaders = pgTable(
|
|||||||
lastTriggerGood: boolean("lastTiggerGood").default(true),
|
lastTriggerGood: boolean("lastTiggerGood").default(true),
|
||||||
active: boolean("active").default(true),
|
active: boolean("active").default(true),
|
||||||
lastTagScanned: text("lastTagScanned"),
|
lastTagScanned: text("lastTagScanned"),
|
||||||
|
goodReads: integer("goodReads").default(0),
|
||||||
|
badReads: integer("badReads").default(0),
|
||||||
},
|
},
|
||||||
(table) => [
|
(table) => [
|
||||||
// uniqueIndex('emailUniqueIndex').on(sql`lower(${table.email})`),
|
// uniqueIndex('emailUniqueIndex').on(sql`lower(${table.email})`),
|
||||||
|
|||||||
Reference in New Issue
Block a user