finamaze_schema 1.35.0 → 1.37.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.
Files changed (30) hide show
  1. package/dist/entity/documents.entity.d.ts +13 -0
  2. package/dist/entity/documents.entity.js +62 -0
  3. package/dist/entity/documents.entity.js.map +1 -0
  4. package/dist/entity/user.entity.d.ts +5 -3
  5. package/dist/entity/user.entity.js +9 -2
  6. package/dist/entity/user.entity.js.map +1 -1
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +1 -0
  9. package/dist/index.js.map +1 -1
  10. package/dist/migrations/{1733323133759-v1.d.ts → 1740671890101-version1.d.ts} +1 -1
  11. package/dist/migrations/1740671890101-version1.js +48 -0
  12. package/dist/migrations/1740671890101-version1.js.map +1 -0
  13. package/dist/migrations/{1734104865215-v2.d.ts → 1740739347863-version2.d.ts} +1 -1
  14. package/dist/migrations/1740739347863-version2.js +18 -0
  15. package/dist/migrations/1740739347863-version2.js.map +1 -0
  16. package/dist/tsconfig.tsbuildinfo +1 -1
  17. package/package.json +8 -2
  18. package/src/entity/documents.entity.ts +36 -0
  19. package/src/entity/user.entity.ts +64 -50
  20. package/src/index.ts +2 -1
  21. package/src/migrations/1740671890101-version1.ts +71 -0
  22. package/src/migrations/1740739347863-version2.ts +16 -0
  23. package/tsconfig.json +1 -1
  24. package/dist/migrations/1733323133759-v1.js +0 -38
  25. package/dist/migrations/1733323133759-v1.js.map +0 -1
  26. package/dist/migrations/1733996187627-removeUniqueValue.d.ts +0 -6
  27. package/dist/migrations/1733996187627-removeUniqueValue.js +0 -18
  28. package/dist/migrations/1733996187627-removeUniqueValue.js.map +0 -1
  29. package/dist/migrations/1734104865215-v2.js +0 -26
  30. package/dist/migrations/1734104865215-v2.js.map +0 -1
@@ -0,0 +1,36 @@
1
+ import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn, UpdateDateColumn, Unique, ManyToOne } from 'typeorm';
2
+ import { User } from './user.entity';
3
+
4
+ @Entity()
5
+ @Unique(['hash'])
6
+ export class Documents {
7
+ @PrimaryGeneratedColumn()
8
+ id: number;
9
+
10
+ @Column({ nullable: true })
11
+ reference_id: string;
12
+
13
+ @Column() // document type term / fact sheet
14
+ type: string;
15
+
16
+ @Column() // document context goal / mutual fund
17
+ context: string;
18
+
19
+ @Column()
20
+ status: string;
21
+
22
+ @Column()
23
+ hash: string;
24
+
25
+ @Column()
26
+ metadata: string;
27
+
28
+ @CreateDateColumn()
29
+ created_at: Date;
30
+
31
+ @UpdateDateColumn()
32
+ updated_at: Date;
33
+
34
+ @ManyToOne(() => User, (user) => user.documents, { nullable: false })
35
+ user: User;
36
+ }
@@ -1,74 +1,88 @@
1
- import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, Unique, OneToMany, Index } from 'typeorm';
2
- import { PhoneNumber } from './phone-number.entity';
3
- import { Email } from './email.entity';
4
- import { GoalPlan } from './goalPlan.entity';
1
+ import {
2
+ Entity,
3
+ Column,
4
+ PrimaryGeneratedColumn,
5
+ CreateDateColumn,
6
+ UpdateDateColumn,
7
+ Unique,
8
+ OneToMany,
9
+ Index,
10
+ } from "typeorm";
11
+ import { PhoneNumber } from "./phone-number.entity";
12
+ import { Email } from "./email.entity";
13
+ import { GoalPlan } from "./goalPlan.entity";
14
+ import { Documents } from "./documents.entity";
5
15
 
6
16
  @Entity()
7
- @Unique(['username'])
17
+ @Unique(["username"])
8
18
  export class User {
9
- @PrimaryGeneratedColumn()
10
- id: number;
19
+ @PrimaryGeneratedColumn()
20
+ id: number;
11
21
 
12
- @Column({ nullable: false })
13
- username: string;
22
+ @Column({ nullable: false })
23
+ username: string;
14
24
 
15
- @Column({ nullable: true })
16
- email: string;
25
+ @Column({ nullable: true })
26
+ email: string;
17
27
 
18
- @OneToMany(() => Email, (email) => email.user, { cascade: true })
19
- emails: Email[];
28
+ @OneToMany(() => Email, (email) => email.user, { cascade: true })
29
+ emails: Email[];
20
30
 
21
- @Column({ nullable: true })
22
- password: string;
31
+ @Column({ nullable: true })
32
+ password: string;
23
33
 
24
- @Column({ nullable: true })
25
- phone_number: string;
26
-
27
- @OneToMany(() => PhoneNumber, (phoneNumber) => phoneNumber.user, { cascade: true })
28
- phone_numbers: PhoneNumber[];
34
+ @Column({ nullable: true })
35
+ phone_number: string;
29
36
 
30
- @Column({ nullable: true })
31
- iqama_number: string;
37
+ @OneToMany(() => PhoneNumber, (phoneNumber) => phoneNumber.user, {
38
+ cascade: true,
39
+ })
40
+ phone_numbers: PhoneNumber[];
32
41
 
33
- @Column({ nullable: true })
34
- is_profile_complete: boolean;
42
+ @Column({ nullable: true })
43
+ iqama_number: string;
35
44
 
36
- @Column({ nullable: true })
37
- registration_step: string;
45
+ @Column({ nullable: true })
46
+ is_profile_complete: boolean;
38
47
 
39
- @Column({ nullable: true })
40
- smartcore_reference_id: number;
48
+ @Column({ nullable: true })
49
+ registration_step: string;
41
50
 
42
- @Column({ nullable: true })
43
- tcs_reference_id: string;
51
+ @Column({ nullable: true })
52
+ smartcore_reference_id: number;
44
53
 
45
- @Column({ nullable: true })
46
- name: string;
54
+ @Column({ nullable: true })
55
+ tcs_reference_id: string;
47
56
 
48
- @Column({ nullable: true })
49
- type: string;
57
+ @Column({ nullable: true })
58
+ name: string;
50
59
 
51
- @Column({ nullable: true })
52
- status: string;
60
+ @Column({ nullable: true })
61
+ type: string;
53
62
 
54
- @Column({nullable: true })
55
- risk_profile: string;
63
+ @Column({ nullable: true })
64
+ status: string;
56
65
 
57
- @Column({default: false})
58
- is_username_set: boolean;
66
+ @Column({ nullable: true })
67
+ risk_profile: string;
59
68
 
69
+ @Column({ default: false })
70
+ is_username_set: boolean;
60
71
 
61
- @Column({nullable: true })
62
- external_status: string;
72
+ @Column({ nullable: true })
73
+ external_status: string;
63
74
 
64
- // Automatically set on entity creation
65
- @CreateDateColumn()
66
- created_at: Date;
75
+ // Automatically set on entity creation
76
+ @CreateDateColumn()
77
+ created_at: Date;
67
78
 
68
- // Automatically updated when entity is updated
69
- @UpdateDateColumn()
70
- updated_at: Date;
79
+ // Automatically updated when entity is updated
80
+ @UpdateDateColumn()
81
+ updated_at: Date;
71
82
 
72
- @OneToMany(() => GoalPlan, (goalPlan) => goalPlan.user, { cascade: true })
73
- goal_plans: GoalPlan[];
83
+ @OneToMany(() => GoalPlan, (goalPlan) => goalPlan.user, { cascade: true })
84
+ goal_plans: GoalPlan[];
85
+
86
+ @OneToMany(() => Documents, (document) => document.user, { cascade: true })
87
+ documents: Documents[];
74
88
  }
package/src/index.ts CHANGED
@@ -10,4 +10,5 @@ export * from './entity/user.entity';
10
10
  export * from './entity/manager.entity';
11
11
  export * from './entity/phone-number.entity';
12
12
  export * from './entity/email.entity';
13
- export * from './entity/goalPlan.entity';
13
+ export * from './entity/goalPlan.entity';
14
+ export * from './entity/documents.entity';
@@ -0,0 +1,71 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class Version11740671890101 implements MigrationInterface {
4
+ name = "Version11740671890101";
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ const phone_number = await queryRunner.hasTable("phone_number");
8
+ if (!phone_number) {
9
+ await queryRunner.query(
10
+ `CREATE TABLE "phone_number" ("id" number GENERATED BY DEFAULT AS IDENTITY, "number" varchar2(255) NOT NULL, "userId" number NOT NULL, CONSTRAINT "PK_c16f58426537a660b3f2a26e983" PRIMARY KEY ("id"))`
11
+ );
12
+ }
13
+
14
+ const email = await queryRunner.hasTable("email");
15
+ if (!email) {
16
+ await queryRunner.query(
17
+ `CREATE TABLE "email" ("id" number GENERATED BY DEFAULT AS IDENTITY, "address" varchar2(255) NOT NULL, "userId" number NOT NULL, CONSTRAINT "PK_1e7ed8734ee054ef18002e29b1c" PRIMARY KEY ("id"))`
18
+ );
19
+ }
20
+
21
+ const goal_plan = await queryRunner.hasTable("goal_plan");
22
+ if (!goal_plan) {
23
+ await queryRunner.query(
24
+ `CREATE TABLE "goal_plan" ("id" number GENERATED BY DEFAULT AS IDENTITY, "objective" varchar2(255) NOT NULL, "currency" varchar2(3) NOT NULL, "initial_amount" number, "target_amount" number, "contribution_amount" number, "contribution_frequency" varchar2(255) NOT NULL, "start_date" varchar2(255) NOT NULL, "investment_duration" number, "userId" number NOT NULL, CONSTRAINT "PK_02a5c53bc719b6694de4bbbe530" PRIMARY KEY ("id"))`
25
+ );
26
+ }
27
+
28
+ const user = await queryRunner.hasTable("user");
29
+ if (!user) {
30
+ await queryRunner.query(
31
+ `CREATE TABLE "user" ("id" number GENERATED BY DEFAULT AS IDENTITY, "username" varchar2(255) NOT NULL, "email" varchar2(255), "password" varchar2(255), "phone_number" varchar2(255), "iqama_number" varchar2(255), "is_profile_complete" number, "registration_step" varchar2(255), "smartcore_reference_id" number, "tcs_reference_id" varchar2(255), "name" varchar2(255), "type" varchar2(255), "status" varchar2(255), "risk_profile" varchar2(255), "is_username_set" number DEFAULT 0 NOT NULL, "external_status" varchar2(255), "created_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, "updated_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "UQ_78a916df40e02a9deb1c4b75edb" UNIQUE ("username"), CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`
32
+ );
33
+ }
34
+
35
+ const manager = await queryRunner.hasTable("manager");
36
+ if (!manager) {
37
+ await queryRunner.query(
38
+ `CREATE TABLE "manager" ("id" number GENERATED BY DEFAULT AS IDENTITY, "username" varchar2(255), "email" varchar2(255) NOT NULL, "password" varchar2(255) NOT NULL, "first_name" varchar2(255), "last_name" varchar2(255), "phone_number" varchar2(255), "mobile_number" varchar2(255), "department" varchar2(255), "sub_department" varchar2(255), "title" varchar2(255), "role" varchar2(255) NOT NULL, "is_deleted" number, "created_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, "updated_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "UQ_ee8fba4edb704ce2465753a2edd" UNIQUE ("email"), CONSTRAINT "PK_b3ac840005ee4ed76a7f1c51d01" PRIMARY KEY ("id"))`
39
+ );
40
+ }
41
+ if (user && manager && phone_number && email && goal_plan) {
42
+ return;
43
+ }
44
+ await queryRunner.query(
45
+ `ALTER TABLE "phone_number" ADD CONSTRAINT "FK_10163df90f85bca68c3e67d090a" FOREIGN KEY ("userId") REFERENCES "user" ("id")`
46
+ );
47
+ await queryRunner.query(
48
+ `ALTER TABLE "email" ADD CONSTRAINT "FK_13e97b4a1d6074fd75ea1bb844e" FOREIGN KEY ("userId") REFERENCES "user" ("id")`
49
+ );
50
+ await queryRunner.query(
51
+ `ALTER TABLE "goal_plan" ADD CONSTRAINT "FK_5d42c50d3e7132a7839cdfdff37" FOREIGN KEY ("userId") REFERENCES "user" ("id")`
52
+ );
53
+ }
54
+
55
+ public async down(queryRunner: QueryRunner): Promise<void> {
56
+ await queryRunner.query(
57
+ `ALTER TABLE "goal_plan" DROP CONSTRAINT "FK_5d42c50d3e7132a7839cdfdff37"`
58
+ );
59
+ await queryRunner.query(
60
+ `ALTER TABLE "email" DROP CONSTRAINT "FK_13e97b4a1d6074fd75ea1bb844e"`
61
+ );
62
+ await queryRunner.query(
63
+ `ALTER TABLE "phone_number" DROP CONSTRAINT "FK_10163df90f85bca68c3e67d090a"`
64
+ );
65
+ await queryRunner.query(`DROP TABLE "manager"`);
66
+ await queryRunner.query(`DROP TABLE "user"`);
67
+ await queryRunner.query(`DROP TABLE "goal_plan"`);
68
+ await queryRunner.query(`DROP TABLE "email"`);
69
+ await queryRunner.query(`DROP TABLE "phone_number"`);
70
+ }
71
+ }
@@ -0,0 +1,16 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class Version21740739347863 implements MigrationInterface {
4
+ name = 'Version21740739347863'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`CREATE TABLE "documents" ("id" number GENERATED BY DEFAULT AS IDENTITY, "reference_id" varchar2(255), "type" varchar2(255) NOT NULL, "context" varchar2(255) NOT NULL, "status" varchar2(255) NOT NULL, "hash" varchar2(255) NOT NULL, "metadata" varchar2(255) NOT NULL, "created_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, "updated_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, "userId" number NOT NULL, CONSTRAINT "UQ_bdd4779a41b5eae833901d1d542" UNIQUE ("hash"), CONSTRAINT "PK_ac51aa5181ee2036f5ca482857c" PRIMARY KEY ("id"))`);
8
+ await queryRunner.query(`ALTER TABLE "documents" ADD CONSTRAINT "FK_e300b5c2e3fefa9d6f8a3f25975" FOREIGN KEY ("userId") REFERENCES "user" ("id")`);
9
+ }
10
+
11
+ public async down(queryRunner: QueryRunner): Promise<void> {
12
+ await queryRunner.query(`ALTER TABLE "documents" DROP CONSTRAINT "FK_e300b5c2e3fefa9d6f8a3f25975"`);
13
+ await queryRunner.query(`DROP TABLE "documents"`);
14
+ }
15
+
16
+ }
package/tsconfig.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "incremental": true,
13
13
  "skipLibCheck": true
14
14
  },
15
- "include": ["src/**/*"],
15
+ "include": ["src/**/*", "src/entity/documents.entity.ts"],
16
16
  "exclude": ["node_modules", "dist"]
17
17
  }
18
18
 
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.V11733323133759 = void 0;
4
- class V11733323133759 {
5
- constructor() {
6
- this.name = 'V11733323133759';
7
- }
8
- async up(queryRunner) {
9
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "iqama_number" TO "national_id"`);
10
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "is_profile_complete" TO "smartcore_sync_status"`);
11
- await queryRunner.query(`UPDATE "user" SET "smartcore_sync_status" = 0 WHERE "smartcore_sync_status" IS NULL`);
12
- await queryRunner.query(`ALTER TABLE "user" MODIFY "smartcore_sync_status" DEFAULT 0`);
13
- await queryRunner.query(`ALTER TABLE "user" MODIFY "smartcore_sync_status" NOT NULL`);
14
- await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "status"`);
15
- await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "risk_profile"`);
16
- await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "is_username_set"`);
17
- await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "external_status"`);
18
- await queryRunner.query(`ALTER TABLE "user" ADD "meta_data" clob`);
19
- await queryRunner.query(`ALTER TABLE "user" ADD "deleted_at" timestamp`);
20
- await queryRunner.query(`ALTER TABLE "user" MODIFY "username" varchar2(255) NULL`);
21
- await queryRunner.query(`ALTER TABLE "user" MODIFY "registration_step" varchar2(255) DEFAULT 'INITIATED' NOT NULL`);
22
- }
23
- async down(queryRunner) {
24
- await queryRunner.query(`ALTER TABLE "user" MODIFY "registration_step" varchar2(255) NULL`);
25
- await queryRunner.query(`ALTER TABLE "user" MODIFY "username" varchar2(255) NOT NULL`);
26
- await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "deleted_at"`);
27
- await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "meta_data"`);
28
- await queryRunner.query(`ALTER TABLE "user" ADD "external_status" varchar2(255) NULL`);
29
- await queryRunner.query(`ALTER TABLE "user" ADD "is_username_set" number DEFAULT 0 NOT NULL`);
30
- await queryRunner.query(`ALTER TABLE "user" ADD "risk_profile" varchar2(255) NULL`);
31
- await queryRunner.query(`ALTER TABLE "user" ADD "status" varchar2(255) NULL`);
32
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "smartcore_sync_status" To "is_profile_complete"`);
33
- await queryRunner.query(`ALTER TABLE "user" MODIFY "is_profile_complete" NULL`);
34
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "national_id" TO "iqama_number"`);
35
- }
36
- }
37
- exports.V11733323133759 = V11733323133759;
38
- //# sourceMappingURL=1733323133759-v1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"1733323133759-v1.js","sourceRoot":"","sources":["../../src/migrations/1733323133759-v1.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAe;IAA5B;QACI,SAAI,GAAG,iBAAiB,CAAA;IAiC5B,CAAC;IA/BU,KAAK,CAAC,EAAE,CAAC,WAAwB;QACpC,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;QAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;QAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,qFAAqF,CAAC,CAAC;QAC/G,MAAM,WAAW,CAAC,KAAK,CAAC,6DAA6D,CAAC,CAAC;QACvF,MAAM,WAAW,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;QACtF,MAAM,WAAW,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;QACnE,MAAM,WAAW,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACzE,MAAM,WAAW,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAC5E,MAAM,WAAW,CAAC,KAAK,CAAC,kDAAkD,CAAC,CAAC;QAC5E,MAAM,WAAW,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;QACnE,MAAM,WAAW,CAAC,KAAK,CAAC,+CAA+C,CAAC,CAAC;QACzE,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QACpF,MAAM,WAAW,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAC;IACxH,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;QAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;QACxF,MAAM,WAAW,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACvE,MAAM,WAAW,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;QACtE,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;QACxF,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;QAC9F,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;QACrF,MAAM,WAAW,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;QAC9E,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;QAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAChF,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;IAEhG,CAAC;CAEJ;AAlCD,0CAkCC"}
@@ -1,6 +0,0 @@
1
- import { MigrationInterface, QueryRunner } from "typeorm";
2
- export declare class RemoveUniqueValue1733996187627 implements MigrationInterface {
3
- name: string;
4
- up(queryRunner: QueryRunner): Promise<void>;
5
- down(queryRunner: QueryRunner): Promise<void>;
6
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RemoveUniqueValue1733996187627 = void 0;
4
- class RemoveUniqueValue1733996187627 {
5
- constructor() {
6
- this.name = 'RemoveUniqueValue1733996187627';
7
- }
8
- async up(queryRunner) {
9
- await queryRunner.query(`CREATE TABLE "manager" ("id" number GENERATED BY DEFAULT AS IDENTITY, "username" varchar2(255), "email" varchar2(255) NOT NULL, "password" varchar2(255) NOT NULL, "first_name" varchar2(255), "last_name" varchar2(255), "phone_number" varchar2(255), "mobile_number" varchar2(255), "department" varchar2(255), "sub_department" varchar2(255), "title" varchar2(255), "role" varchar2(255) NOT NULL, "is_deleted" number, "created_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, "updated_at" timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL, CONSTRAINT "UQ_ee8fba4edb704ce2465753a2edd" UNIQUE ("email"), CONSTRAINT "PK_b3ac840005ee4ed76a7f1c51d01" PRIMARY KEY ("id"))`);
10
- await queryRunner.query(`ALTER TABLE "user" DROP CONSTRAINT "UQ_78a916df40e02a9deb1c4b75edb"`);
11
- }
12
- async down(queryRunner) {
13
- await queryRunner.query(`ALTER TABLE "user" ADD CONSTRAINT "UQ_78a916df40e02a9deb1c4b75edb" UNIQUE ("username")`);
14
- await queryRunner.query(`DROP TABLE "manager"`);
15
- }
16
- }
17
- exports.RemoveUniqueValue1733996187627 = RemoveUniqueValue1733996187627;
18
- //# sourceMappingURL=1733996187627-removeUniqueValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"1733996187627-removeUniqueValue.js","sourceRoot":"","sources":["../../src/migrations/1733996187627-removeUniqueValue.ts"],"names":[],"mappings":";;;AAEA,MAAa,8BAA8B;IAA3C;QACI,SAAI,GAAG,gCAAgC,CAAA;IAY3C,CAAC;IAVU,KAAK,CAAC,EAAE,CAAC,WAAwB;QACpC,MAAM,WAAW,CAAC,KAAK,CAAC,mpBAAmpB,CAAC,CAAC;QAC7qB,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACnG,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC,wFAAwF,CAAC,CAAC;QAClH,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACpD,CAAC;CAEJ;AAbD,wEAaC"}
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.V21734104865215 = void 0;
4
- class V21734104865215 {
5
- constructor() {
6
- this.name = 'V21734104865215';
7
- }
8
- async up(queryRunner) {
9
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "name" TO "full_name"`);
10
- await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "type"`);
11
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "meta_data" TO "metadata"`);
12
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "tcs_reference_id" TO "cif"`);
13
- await queryRunner.query(`ALTER TABLE "user" ADD CONSTRAINT "UQ_78a916df40e02a9deb1c4b75edb" UNIQUE ("username")`);
14
- await queryRunner.query(`DROP TABLE "goal_plan"`);
15
- await queryRunner.query(`DROP TABLE "phone_number"`);
16
- await queryRunner.query(`Drop TABLE "email"`);
17
- }
18
- async down(queryRunner) {
19
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "cif" TO "tcs_reference_id"`);
20
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "metadata" TO "meta_data"`);
21
- await queryRunner.query(`ALTER TABLE "user" ADD "type" varchar2(255)`);
22
- await queryRunner.query(`ALTER TABLE "user" RENAME COLUMN "full_name" TO "name"`);
23
- }
24
- }
25
- exports.V21734104865215 = V21734104865215;
26
- //# sourceMappingURL=1734104865215-v2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"1734104865215-v2.js","sourceRoot":"","sources":["../../src/migrations/1734104865215-v2.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAe;IAA5B;QACI,SAAI,GAAG,iBAAiB,CAAA;IAoB5B,CAAC;IAlBU,KAAK,CAAC,EAAE,CAAC,WAAwB;QACpC,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAClF,MAAM,WAAW,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACjE,MAAM,WAAW,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;QACtF,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;QACxF,MAAM,WAAW,CAAC,KAAK,CAAC,wFAAwF,CAAC,CAAC;QAClH,MAAM,WAAW,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAClD,MAAM,WAAW,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACrD,MAAM,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IAClD,CAAC;IAEM,KAAK,CAAC,IAAI,CAAC,WAAwB;QACtC,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;QACxF,MAAM,WAAW,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;QACtF,MAAM,WAAW,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACvE,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;IACtF,CAAC;CAEJ;AArBD,0CAqBC"}