@adaptware/eagles-db 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client/edge.js CHANGED
@@ -1244,7 +1244,7 @@ const config = {
1244
1244
  "value": "prisma-client-js"
1245
1245
  },
1246
1246
  "output": {
1247
- "value": "/Users/aadityanarainsingh/Documents/treadspace/eagles/eagles-db/client",
1247
+ "value": "/Users/abhinavaggarwal/Documents/Adaptware/Treadspace/eagles-db/client",
1248
1248
  "fromEnvVar": null
1249
1249
  },
1250
1250
  "config": {
@@ -1262,7 +1262,7 @@ const config = {
1262
1262
  }
1263
1263
  ],
1264
1264
  "previewFeatures": [],
1265
- "sourceFilePath": "/Users/aadityanarainsingh/Documents/treadspace/eagles/eagles-db/prisma/schema/schema.prisma",
1265
+ "sourceFilePath": "/Users/abhinavaggarwal/Documents/Adaptware/Treadspace/eagles-db/prisma/schema/schema.prisma",
1266
1266
  "isCustomOutput": true
1267
1267
  },
1268
1268
  "relativeEnvPaths": {
package/client/index.js CHANGED
@@ -1245,7 +1245,7 @@ const config = {
1245
1245
  "value": "prisma-client-js"
1246
1246
  },
1247
1247
  "output": {
1248
- "value": "/Users/aadityanarainsingh/Documents/treadspace/eagles/eagles-db/client",
1248
+ "value": "/Users/abhinavaggarwal/Documents/Adaptware/Treadspace/eagles-db/client",
1249
1249
  "fromEnvVar": null
1250
1250
  },
1251
1251
  "config": {
@@ -1263,7 +1263,7 @@ const config = {
1263
1263
  }
1264
1264
  ],
1265
1265
  "previewFeatures": [],
1266
- "sourceFilePath": "/Users/aadityanarainsingh/Documents/treadspace/eagles/eagles-db/prisma/schema/schema.prisma",
1266
+ "sourceFilePath": "/Users/abhinavaggarwal/Documents/Adaptware/Treadspace/eagles-db/prisma/schema/schema.prisma",
1267
1267
  "isCustomOutput": true
1268
1268
  },
1269
1269
  "relativeEnvPaths": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptware/eagles-db",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "A Prisma client package for Treadspace database operations",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
Binary file
@@ -0,0 +1,2 @@
1
+ -- Full AI interview completion window (calendar days); nullable for non–Full AI rows.
2
+ ALTER TABLE "Interview" ADD COLUMN IF NOT EXISTS "deadline" INTEGER;
@@ -0,0 +1,30 @@
1
+ -- Interview.duration (minutes) replaces timestamp-derived length; Interview.deadline removed (window = scheduled_end_time).
2
+ ALTER TABLE "Interview" ADD COLUMN IF NOT EXISTS "duration" INTEGER;
3
+
4
+ ALTER TABLE "Interview" DROP COLUMN IF EXISTS "deadline";
5
+
6
+ -- Best-effort inline backfill (Full AI rows may be wrong until backfill-interview-duration.ts runs).
7
+ UPDATE "Interview" i
8
+ SET "duration" = GREATEST(
9
+ 1,
10
+ ROUND(
11
+ EXTRACT(EPOCH FROM (i."scheduled_end_time" - i."scheduled_start_time")) / 60
12
+ )::integer
13
+ )
14
+ WHERE i."duration" IS NULL
15
+ AND i."scheduled_start_time" IS NOT NULL
16
+ AND i."scheduled_end_time" IS NOT NULL
17
+ AND i."scheduled_end_time" > i."scheduled_start_time"
18
+ AND (i."evaluation_type" IS NULL OR i."evaluation_type"::text <> 'TREADSPACE_FULL_AI');
19
+
20
+ UPDATE "Interview" i
21
+ SET "duration" = oe."duration"
22
+ FROM "OngoingEvaluation" oe
23
+ WHERE oe."interview_id" = i."id"
24
+ AND i."duration" IS NULL
25
+ AND oe."duration" IS NOT NULL
26
+ AND oe."duration_unit" = 'MINUTES';
27
+
28
+ UPDATE "Interview"
29
+ SET "duration" = 45
30
+ WHERE "duration" IS NULL;