@platform-modules/foreign-ministry 1.3.359 → 1.3.361

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.3.359",
3
+ "version": "1.3.361",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -0,0 +1,12 @@
1
+ -- Replace job_number with nominated_user_id (users.id) on employee of month nomination requests.
2
+ ALTER TABLE employee_of_month_nomination_requests
3
+ ADD COLUMN IF NOT EXISTS nominated_user_id INT;
4
+
5
+ UPDATE employee_of_month_nomination_requests
6
+ SET nominated_user_id = NULLIF(regexp_replace(COALESCE(job_number, ''), '\D', '', 'g'), '')::INT
7
+ WHERE nominated_user_id IS NULL
8
+ AND job_number IS NOT NULL
9
+ AND job_number ~ '^\d+$';
10
+
11
+ ALTER TABLE employee_of_month_nomination_requests
12
+ DROP COLUMN IF EXISTS job_number;
@@ -38,8 +38,9 @@ export class EmployeeOfMonthNominationRequests extends BaseModel {
38
38
  @Column({ type: 'int', nullable: false })
39
39
  user_id: number;
40
40
 
41
- @Column({ type: 'varchar', length: 120, nullable: false })
42
- job_number: string;
41
+ /** Nominated employee (users.id). */
42
+ @Column({ type: 'int', nullable: true })
43
+ nominated_user_id: number;
43
44
 
44
45
  @Column({ type: 'varchar', length: 255, nullable: false })
45
46
  last_annual_assessment: string;
@@ -41,7 +41,7 @@ export class InitiatorEmployeeNominationRequests extends BaseModel {
41
41
  user_id: number;
42
42
 
43
43
  /** Nominated employee (users.id). */
44
- @Column({ type: 'int', nullable: false })
44
+ @Column({ type: 'int', nullable: true })
45
45
  initiator_id: number;
46
46
 
47
47
  @Column({ type: 'varchar', length: 255, nullable: false })