finamaze_schema 1.28.0 → 1.30.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 (38) hide show
  1. package/dist/entity/manager.entity.js +1 -1
  2. package/dist/entity/manager.entity.js.map +1 -1
  3. package/dist/entity/user.entity.d.ts +10 -12
  4. package/dist/entity/user.entity.js +21 -33
  5. package/dist/entity/user.entity.js.map +1 -1
  6. package/dist/index.d.ts +0 -2
  7. package/dist/index.js +0 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/migrations/{1727451705010-goalpla.d.ts → 1733323133759-v1.d.ts} +1 -1
  10. package/dist/migrations/1733323133759-v1.js +38 -0
  11. package/dist/migrations/1733323133759-v1.js.map +1 -0
  12. package/dist/migrations/{1727446645786-goalpla.d.ts → 1733996187627-removeUniqueValue.d.ts} +1 -1
  13. package/dist/migrations/1733996187627-removeUniqueValue.js +18 -0
  14. package/dist/migrations/1733996187627-removeUniqueValue.js.map +1 -0
  15. package/dist/tsconfig.tsbuildinfo +1 -1
  16. package/package.json +3 -2
  17. package/src/entity/manager.entity.ts +53 -48
  18. package/src/entity/user.entity.ts +54 -54
  19. package/src/index.ts +0 -2
  20. package/src/migrations/1733323133759-v1.ts +37 -0
  21. package/dist/entity/email.entity.d.ts +0 -6
  22. package/dist/entity/email.entity.js +0 -33
  23. package/dist/entity/email.entity.js.map +0 -1
  24. package/dist/entity/goal-plan.d.ts +0 -13
  25. package/dist/entity/goal-plan.js +0 -64
  26. package/dist/entity/goal-plan.js.map +0 -1
  27. package/dist/entity/goalPlan.entity.d.ts +0 -13
  28. package/dist/entity/goalPlan.entity.js +0 -64
  29. package/dist/entity/goalPlan.entity.js.map +0 -1
  30. package/dist/migrations/1727446645786-goalpla.js +0 -18
  31. package/dist/migrations/1727446645786-goalpla.js.map +0 -1
  32. package/dist/migrations/1727449258977-goalpla.d.ts +0 -6
  33. package/dist/migrations/1727449258977-goalpla.js +0 -18
  34. package/dist/migrations/1727449258977-goalpla.js.map +0 -1
  35. package/dist/migrations/1727451705010-goalpla.js +0 -18
  36. package/dist/migrations/1727451705010-goalpla.js.map +0 -1
  37. package/src/entity/email.entity.ts +0 -14
  38. package/src/entity/goalPlan.entity.ts +0 -38
@@ -76,6 +76,6 @@ __decorate([
76
76
  ], Manager.prototype, "updated_at", void 0);
77
77
  exports.Manager = Manager = __decorate([
78
78
  (0, typeorm_1.Entity)(),
79
- (0, typeorm_1.Unique)(['email'])
79
+ (0, typeorm_1.Unique)(["email"])
80
80
  ], Manager);
81
81
  //# sourceMappingURL=manager.entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manager.entity.js","sourceRoot":"","sources":["../../src/entity/manager.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA2F;AAIpF,IAAM,OAAO,GAAb,MAAM,OAAO;CA8CnB,CAAA;AA9CY,0BAAO;AAEhB;IADC,IAAA,gCAAsB,GAAE;;mCACd;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACV;AAGjB;IADC,IAAA,gBAAM,GAAE;;sCACK;AAGd;IADC,IAAA,gBAAM,GAAE;;yCACQ;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACR;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACT;AAGlB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACN;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACL;AAItB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACR;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACJ;AAGvB;IADC,IAAA,gBAAM,EAAC,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AE,IAAI,EAAE,CAAC;;sCACb;AAGd;IADC,IAAA,gBAAM,GAAE;;qCACI;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACP;AAGpB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;2CAAC;AAGjB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;2CAAC;kBA5CN,OAAO;IAFnB,IAAA,gBAAM,GAAE;IACR,IAAA,gBAAM,EAAC,CAAC,OAAO,CAAC,CAAC;GACL,OAAO,CA6CnB"}
@@ -1,26 +1,24 @@
1
- import { PhoneNumber } from './phone-number.entity';
2
- import { Email } from './email.entity';
3
- import { GoalPlan } from './goalPlan.entity';
1
+ import { PhoneNumber } from "./phone-number.entity";
2
+ export declare enum RegistrationStep {
3
+ INITIATED = "INITIATED",
4
+ COMPLETED = "COMPLETED"
5
+ }
4
6
  export declare class User {
5
7
  id: number;
6
8
  username: string;
7
9
  email: string;
8
- emails: Email[];
9
10
  password: string;
10
11
  phone_number: string;
11
12
  phone_numbers: PhoneNumber[];
12
- iqama_number: string;
13
- is_profile_complete: boolean;
14
- registration_step: string;
13
+ national_id: string;
14
+ smartcore_sync_status: boolean;
15
+ registration_step: RegistrationStep;
15
16
  smartcore_reference_id: number;
16
17
  tcs_reference_id: string;
17
18
  name: string;
18
19
  type: string;
19
- status: string;
20
- risk_profile: string;
21
- is_username_set: boolean;
22
- external_status: string;
20
+ meta_data: string;
23
21
  created_at: Date;
24
22
  updated_at: Date;
25
- goal_plans: GoalPlan[];
23
+ deleted_at: Date | null;
26
24
  }
@@ -9,11 +9,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.User = void 0;
12
+ exports.User = exports.RegistrationStep = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const phone_number_entity_1 = require("./phone-number.entity");
15
- const email_entity_1 = require("./email.entity");
16
- const goalPlan_entity_1 = require("./goalPlan.entity");
15
+ var RegistrationStep;
16
+ (function (RegistrationStep) {
17
+ RegistrationStep["INITIATED"] = "INITIATED";
18
+ RegistrationStep["COMPLETED"] = "COMPLETED";
19
+ })(RegistrationStep || (exports.RegistrationStep = RegistrationStep = {}));
17
20
  let User = class User {
18
21
  };
19
22
  exports.User = User;
@@ -22,7 +25,7 @@ __decorate([
22
25
  __metadata("design:type", Number)
23
26
  ], User.prototype, "id", void 0);
24
27
  __decorate([
25
- (0, typeorm_1.Column)({ nullable: false }),
28
+ (0, typeorm_1.Column)({ nullable: true }),
26
29
  __metadata("design:type", String)
27
30
  ], User.prototype, "username", void 0);
28
31
  __decorate([
@@ -30,11 +33,7 @@ __decorate([
30
33
  __metadata("design:type", String)
31
34
  ], User.prototype, "email", void 0);
32
35
  __decorate([
33
- (0, typeorm_1.OneToMany)(() => email_entity_1.Email, (email) => email.user, { cascade: true }),
34
- __metadata("design:type", Array)
35
- ], User.prototype, "emails", void 0);
36
- __decorate([
37
- (0, typeorm_1.Column)({ nullable: true }),
36
+ (0, typeorm_1.Column)({ nullable: true, select: false }),
38
37
  __metadata("design:type", String)
39
38
  ], User.prototype, "password", void 0);
40
39
  __decorate([
@@ -42,19 +41,21 @@ __decorate([
42
41
  __metadata("design:type", String)
43
42
  ], User.prototype, "phone_number", void 0);
44
43
  __decorate([
45
- (0, typeorm_1.OneToMany)(() => phone_number_entity_1.PhoneNumber, (phoneNumber) => phoneNumber.user, { cascade: true }),
44
+ (0, typeorm_1.OneToMany)(() => phone_number_entity_1.PhoneNumber, (phoneNumber) => phoneNumber.user, {
45
+ cascade: true,
46
+ }),
46
47
  __metadata("design:type", Array)
47
48
  ], User.prototype, "phone_numbers", void 0);
48
49
  __decorate([
49
50
  (0, typeorm_1.Column)({ nullable: true }),
50
51
  __metadata("design:type", String)
51
- ], User.prototype, "iqama_number", void 0);
52
+ ], User.prototype, "national_id", void 0);
52
53
  __decorate([
53
- (0, typeorm_1.Column)({ nullable: true }),
54
+ (0, typeorm_1.Column)({ default: false }),
54
55
  __metadata("design:type", Boolean)
55
- ], User.prototype, "is_profile_complete", void 0);
56
+ ], User.prototype, "smartcore_sync_status", void 0);
56
57
  __decorate([
57
- (0, typeorm_1.Column)({ nullable: true }),
58
+ (0, typeorm_1.Column)({ type: "varchar2", default: RegistrationStep.INITIATED }),
58
59
  __metadata("design:type", String)
59
60
  ], User.prototype, "registration_step", void 0);
60
61
  __decorate([
@@ -74,21 +75,9 @@ __decorate([
74
75
  __metadata("design:type", String)
75
76
  ], User.prototype, "type", void 0);
76
77
  __decorate([
77
- (0, typeorm_1.Column)({ nullable: true }),
78
+ (0, typeorm_1.Column)({ type: "clob", nullable: true }),
78
79
  __metadata("design:type", String)
79
- ], User.prototype, "status", void 0);
80
- __decorate([
81
- (0, typeorm_1.Column)({ nullable: true }),
82
- __metadata("design:type", String)
83
- ], User.prototype, "risk_profile", void 0);
84
- __decorate([
85
- (0, typeorm_1.Column)({ default: false }),
86
- __metadata("design:type", Boolean)
87
- ], User.prototype, "is_username_set", void 0);
88
- __decorate([
89
- (0, typeorm_1.Column)({ nullable: true }),
90
- __metadata("design:type", String)
91
- ], User.prototype, "external_status", void 0);
80
+ ], User.prototype, "meta_data", void 0);
92
81
  __decorate([
93
82
  (0, typeorm_1.CreateDateColumn)(),
94
83
  __metadata("design:type", Date)
@@ -98,11 +87,10 @@ __decorate([
98
87
  __metadata("design:type", Date)
99
88
  ], User.prototype, "updated_at", void 0);
100
89
  __decorate([
101
- (0, typeorm_1.OneToMany)(() => goalPlan_entity_1.GoalPlan, (goalPlan) => goalPlan.user, { cascade: true }),
102
- __metadata("design:type", Array)
103
- ], User.prototype, "goal_plans", void 0);
90
+ (0, typeorm_1.DeleteDateColumn)(),
91
+ __metadata("design:type", Date)
92
+ ], User.prototype, "deleted_at", void 0);
104
93
  exports.User = User = __decorate([
105
- (0, typeorm_1.Entity)(),
106
- (0, typeorm_1.Unique)(['username'])
94
+ (0, typeorm_1.Entity)()
107
95
  ], User);
108
96
  //# sourceMappingURL=user.entity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"user.entity.js","sourceRoot":"","sources":["../../src/entity/user.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+H;AAC/H,+DAAoD;AACpD,iDAAuC;AACvC,uDAA6C;AAItC,IAAM,IAAI,GAAV,MAAM,IAAI;CAkEhB,CAAA;AAlEY,oBAAI;AAEb;IADC,IAAA,gCAAsB,GAAE;;gCACd;AAGX;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;sCACX;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mCACb;AAGd;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;oCACjD;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACV;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACN;AAGrB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iCAAW,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;2CACtD;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACN;AAGrB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACE;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACD;AAG1B;IADC,IAAA,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CACvB;AAGlB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;wCAAC;AAGjB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;wCAAC;AAGjB;IADC,IAAA,0BAAgB,GAAE;8BACP,IAAI;wCAAQ;eApDb,IAAI;IAFhB,IAAA,gBAAM,GAAE;GAEI,IAAI,CAqDhB"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
1
  export * from './entity/user.entity';
2
2
  export * from './entity/manager.entity';
3
3
  export * from './entity/phone-number.entity';
4
- export * from './entity/email.entity';
5
- export * from './entity/goalPlan.entity';
package/dist/index.js CHANGED
@@ -17,6 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./entity/user.entity"), exports);
18
18
  __exportStar(require("./entity/manager.entity"), exports);
19
19
  __exportStar(require("./entity/phone-number.entity"), exports);
20
- __exportStar(require("./entity/email.entity"), exports);
21
- __exportStar(require("./entity/goalPlan.entity"), exports);
22
20
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAQA,uDAAqC;AACrC,0DAAwC;AACxC,+DAA6C;AAC7C,wDAAsC;AACtC,2DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAQA,uDAAqC;AACrC,0DAAwC;AACxC,+DAA6C"}
@@ -1,5 +1,5 @@
1
1
  import { MigrationInterface, QueryRunner } from "typeorm";
2
- export declare class Goalpla1727451705010 implements MigrationInterface {
2
+ export declare class V11733323133759 implements MigrationInterface {
3
3
  name: string;
4
4
  up(queryRunner: QueryRunner): Promise<void>;
5
5
  down(queryRunner: QueryRunner): Promise<void>;
@@ -0,0 +1,38 @@
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
@@ -0,0 +1 @@
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,5 +1,5 @@
1
1
  import { MigrationInterface, QueryRunner } from "typeorm";
2
- export declare class Goalpla1727446645786 implements MigrationInterface {
2
+ export declare class RemoveUniqueValue1733996187627 implements MigrationInterface {
3
3
  name: string;
4
4
  up(queryRunner: QueryRunner): Promise<void>;
5
5
  down(queryRunner: QueryRunner): Promise<void>;
@@ -0,0 +1,18 @@
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
@@ -0,0 +1 @@
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"}