feat(rfid): reader and tag db completed

This commit is contained in:
2025-03-16 15:32:21 -05:00
parent 3ea6dc5bc4
commit 33803a69a6
15 changed files with 18478 additions and 12033 deletions

View File

@@ -0,0 +1 @@
ALTER TABLE "rfidReaders" ADD COLUMN "lastTrigger" timestamp DEFAULT now();

View File

@@ -0,0 +1 @@
ALTER TABLE "rfidReaders" ADD COLUMN "active" boolean DEFAULT true;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "rfidTags" ADD COLUMN "antenna" numeric;--> statement-breakpoint
ALTER TABLE "rfidTags" ADD COLUMN "tagStrength" numeric;

View File

@@ -0,0 +1,2 @@
ALTER TABLE "rfidTags" ALTER COLUMN "counts" SET DEFAULT '[]'::jsonb;--> statement-breakpoint
ALTER TABLE "rfidTags" ALTER COLUMN "counts" DROP NOT NULL;

View File

@@ -0,0 +1,4 @@
ALTER TABLE "rfidTags" ALTER COLUMN "runningNumber" SET DATA TYPE integer;--> statement-breakpoint
ALTER TABLE "rfidTags" ALTER COLUMN "runningNumber" DROP NOT NULL;--> statement-breakpoint
ALTER TABLE "rfidTags" ALTER COLUMN "antenna" SET DATA TYPE integer;--> statement-breakpoint
ALTER TABLE "rfidTags" ALTER COLUMN "tagStrength" SET DATA TYPE integer;

View File

@@ -0,0 +1 @@
ALTER TABLE "rfidReaders" ADD COLUMN "lastTiggerGood" boolean DEFAULT true;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -120,6 +120,48 @@
"when": 1742051878587, "when": 1742051878587,
"tag": "0016_wet_doctor_strange", "tag": "0016_wet_doctor_strange",
"breakpoints": true "breakpoints": true
},
{
"idx": 17,
"version": "7",
"when": 1742133439717,
"tag": "0017_bitter_brood",
"breakpoints": true
},
{
"idx": 18,
"version": "7",
"when": 1742133828291,
"tag": "0018_lovely_landau",
"breakpoints": true
},
{
"idx": 19,
"version": "7",
"when": 1742139737945,
"tag": "0019_greedy_justice",
"breakpoints": true
},
{
"idx": 20,
"version": "7",
"when": 1742143798267,
"tag": "0020_empty_thundra",
"breakpoints": true
},
{
"idx": 21,
"version": "7",
"when": 1742144973347,
"tag": "0021_premium_albert_cleary",
"breakpoints": true
},
{
"idx": 22,
"version": "7",
"when": 1742156466912,
"tag": "0022_amused_true_believers",
"breakpoints": true
} }
] ]
} }

15
package-lock.json generated
View File

@@ -27,6 +27,7 @@
"mssql": "^11.0.1", "mssql": "^11.0.1",
"nodemailer": "^6.10.0", "nodemailer": "^6.10.0",
"nodemailer-express-handlebars": "^7.0.0", "nodemailer-express-handlebars": "^7.0.0",
"npm-check-updates": "^17.1.15",
"pg": "^8.13.3", "pg": "^8.13.3",
"pino": "^9.6.0", "pino": "^9.6.0",
"pino-abstract-transport": "^2.0.0", "pino-abstract-transport": "^2.0.0",
@@ -8783,6 +8784,20 @@
"node": ">=10" "node": ">=10"
} }
}, },
"node_modules/npm-check-updates": {
"version": "17.1.15",
"resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-17.1.15.tgz",
"integrity": "sha512-miATvKu5rjec/1wxc5TGDjpsucgtCHwRVZorZpDkS6NzdWXfnUWlN4abZddWb7XSijAuBNzzYglIdTm9SbgMVg==",
"license": "Apache-2.0",
"bin": {
"ncu": "build/cli.js",
"npm-check-updates": "build/cli.js"
},
"engines": {
"node": "^18.18.0 || >=20.0.0",
"npm": ">=8.12.1"
}
},
"node_modules/npm-run-path": { "node_modules/npm-run-path": {
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",

View File

@@ -15,11 +15,13 @@
"start:server": "dotenvx run -f .env -- node dist/server/index.js", "start:server": "dotenvx run -f .env -- node dist/server/index.js",
"db:generate": "npx drizzle-kit generate", "db:generate": "npx drizzle-kit generate",
"db:migrate": "npx drizzle-kit push", "db:migrate": "npx drizzle-kit push",
"db:dev": "npm run build && npm run db:generate && npm run db:migrate",
"deploy": "standard-version --conventional-commits && npm run prodBuild", "deploy": "standard-version --conventional-commits && npm run prodBuild",
"zipServer": "dotenvx run -f .env -- tsx server/scripts/zipUpBuild.ts \"C:\\Users\\matthes01\\Documents\\lstv2\"", "zipServer": "dotenvx run -f .env -- tsx server/scripts/zipUpBuild.ts \"C:\\Users\\matthes01\\Documents\\lstv2\"",
"prodBuild": "powershell -ExecutionPolicy Bypass -File server/scripts/build.ps1 -dir \"C:\\Users\\matthes01\\Documents\\lstv2\" && npm run zipServer", "prodBuild": "powershell -ExecutionPolicy Bypass -File server/scripts/build.ps1 -dir \"C:\\Users\\matthes01\\Documents\\lstv2\" && npm run zipServer",
"commit": "cz", "commit": "cz",
"prodinstall": "npm i --omit=dev && npm run db:migrate" "prodinstall": "npm i --omit=dev && npm run db:migrate",
"checkupdates": "npm-check-updates"
}, },
"dependencies": { "dependencies": {
"@dotenvx/dotenvx": "^1.38.3", "@dotenvx/dotenvx": "^1.38.3",