@kernhq/module-hr 0.1.0 → 0.2.0

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.
@@ -1,3 +1,16 @@
1
+ -- Extensions this module's own schema needs.
2
+ --
3
+ -- `core` creates these too, and in a real instance it migrates first — but a module must not depend
4
+ -- on another module's migration having run. `hr` can be hosted by a service that does not carry
5
+ -- core, and its tests boot it alone against a scratch database, where `ltree` would not exist.
6
+ -- `if not exists` makes saying so twice free.
7
+ --
8
+ -- Re-add this block after `pnpm db:generate`: drizzle-kit rewrites this file and does not know
9
+ -- about it, the same way it does not know the schema is created before migrations run.
10
+ CREATE EXTENSION IF NOT EXISTS ltree;
11
+ --> statement-breakpoint
12
+ CREATE EXTENSION IF NOT EXISTS btree_gist;
13
+ --> statement-breakpoint
1
14
  CREATE SCHEMA IF NOT EXISTS "mod_hr";
2
15
  --> statement-breakpoint
3
16
  CREATE TABLE "mod_hr"."calendar_days" (
@@ -98,8 +98,6 @@ create policy "calendar_days_ws_isolation" on "mod_hr"."calendar_days"
98
98
  -- them here means the loser gets a constraint violation instead of the system holding two
99
99
  -- contradictory answers to a question an auditor will eventually ask.
100
100
 
101
- create extension if not exists btree_gist;--> statement-breakpoint
102
-
103
101
  -- One workspace, one default office. It is where a person with no assignment lands and where the
104
102
  -- resolution ladder bottoms out, so two of them would make "which calendar applies" ambiguous.
105
103
  create unique index "hr_offices_one_default_per_ws"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kernhq/module-hr",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Kern HR module: people, offices, org chart, calendars",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
@@ -45,7 +45,9 @@
45
45
  "devDependencies": {
46
46
  "@kernhq/tsconfig": "^0.1.0",
47
47
  "@types/node": "^24.0.0",
48
+ "@types/pg": "^8.15.0",
48
49
  "drizzle-kit": "^0.31.0",
50
+ "pg": "^8.16.0",
49
51
  "typescript": "~5.9.3",
50
52
  "vitest": "^4.0.0"
51
53
  },