@reachu/database 1.0.44 → 1.0.46

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.
@@ -5,6 +5,7 @@ export default class Plan extends AuditedModel {
5
5
  id: number;
6
6
  name: string;
7
7
  description: string;
8
+ code: string;
8
9
  originId: string;
9
10
  response: string;
10
11
  subscriptions: Subscription[];
@@ -33,6 +33,10 @@ __decorate([
33
33
  typeorm_1.Column('varchar', { nullable: true }),
34
34
  __metadata("design:type", String)
35
35
  ], Plan.prototype, "description", void 0);
36
+ __decorate([
37
+ typeorm_1.Column('varchar', { nullable: true }),
38
+ __metadata("design:type", String)
39
+ ], Plan.prototype, "code", void 0);
36
40
  __decorate([
37
41
  typeorm_1.Column('varchar', { nullable: true }),
38
42
  __metadata("design:type", String)
@@ -1 +1 @@
1
- {"version":3,"file":"Plan.js","sourceRoot":"","sources":["../../../../src/entity/modules/subscriptions/Plan.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sEAA8C;AAC9C,qCAOiB;AACjB,kEAA0C;AAG1C,IAAqB,IAAI,GAAzB,MAAqB,IAAK,SAAQ,sBAAY;CAyB7C,CAAA;AAvBC;IADC,0BAAgB,EAAE;8BACR,IAAI;uCAAC;AAGhB;IADC,gCAAsB,EAAE;;gCACd;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;kCACtB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAClB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACrB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACrB;AAIjB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,sBAAY,EAAE,CAAC,YAA0B,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;IAChF,oBAAU,EAAE;;2CACiB;AAG9B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACtB;AAxBG,IAAI;IADxB,gBAAM,EAAE;GACY,IAAI,CAyBxB;kBAzBoB,IAAI"}
1
+ {"version":3,"file":"Plan.js","sourceRoot":"","sources":["../../../../src/entity/modules/subscriptions/Plan.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,sEAA8C;AAC9C,qCAOiB;AACjB,kEAA0C;AAG1C,IAAqB,IAAI,GAAzB,MAAqB,IAAK,SAAQ,sBAAY;CA4B7C,CAAA;AA1BC;IADC,0BAAgB,EAAE;8BACR,IAAI;uCAAC;AAGhB;IADC,gCAAsB,EAAE;;gCACd;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;;kCACtB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAClB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kCACzB;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACrB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACrB;AAIjB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,sBAAY,EAAE,CAAC,YAA0B,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;IAChF,oBAAU,EAAE;;2CACiB;AAG9B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qCACtB;AA3BG,IAAI;IADxB,gBAAM,EAAE;GACY,IAAI,CA4BxB;kBA5BoB,IAAI"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class codeInPlan1682691040003 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.codeInPlan1682691040003 = void 0;
13
+ class codeInPlan1682691040003 {
14
+ constructor() {
15
+ this.name = 'codeInPlan1682691040003';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`DROP INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` ON \`user\``);
20
+ yield queryRunner.query(`ALTER TABLE \`plan\` ADD \`code\` varchar(255) NULL`);
21
+ });
22
+ }
23
+ down(queryRunner) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ yield queryRunner.query(`ALTER TABLE \`plan\` DROP COLUMN \`code\``);
26
+ yield queryRunner.query(`CREATE UNIQUE INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` ON \`user\` (\`user_count_plan_id\`)`);
27
+ });
28
+ }
29
+ }
30
+ exports.codeInPlan1682691040003 = codeInPlan1682691040003;
31
+ //# sourceMappingURL=1682691040003-code-in-plan.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1682691040003-code-in-plan.js","sourceRoot":"","sources":["../../src/migrations/1682691040003-code-in-plan.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,uBAAuB;IAApC;QACI,SAAI,GAAG,yBAAyB,CAAA;IAYpC,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;YACrF,MAAM,WAAW,CAAC,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACnF,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;YACrE,MAAM,WAAW,CAAC,KAAK,CAAC,6FAA6F,CAAC,CAAC;QAC3H,CAAC;KAAA;CAEJ;AAbD,0DAaC"}
@@ -2552,8 +2552,8 @@
2552
2552
  "affectsGlobalScope": false
2553
2553
  },
2554
2554
  "../src/entity/modules/subscriptions/plan.ts": {
2555
- "version": "065f3188526fe4c7f7537d3d6f2bd5a08bf5f4fb6956f26ff4285e8f05005c95",
2556
- "signature": "243c69dc0603af127fd61d668fbf1da2bb361f022b59bb4b15060a1f35b2401e",
2555
+ "version": "647b7b0f81c19698a5ccc762dfcbd7c54b259171f3343071cf5089e3f4b52d21",
2556
+ "signature": "10a952cc0287ca84047a81d489c5ffc68d892b3a49da7d6c5dde84b78908ae44",
2557
2557
  "affectsGlobalScope": false
2558
2558
  },
2559
2559
  "../src/entity/modules/subscriptions/subscription.ts": {
@@ -3186,6 +3186,11 @@
3186
3186
  "signature": "65e61ec85f9337c37d059ba9be7548d5bd5aad6b451cae48742d77293b2bb963",
3187
3187
  "affectsGlobalScope": false
3188
3188
  },
3189
+ "../src/migrations/1682691040003-code-in-plan.ts": {
3190
+ "version": "05fbc0fa54282568ffbdaa9b5833bde5a126eb8bdcd9a7fc3fc1caa20de8872d",
3191
+ "signature": "1ba1f71df80e7a6e6106a2dcd6f020c9e9458e3b2cc805d5707c437f21e651cb",
3192
+ "affectsGlobalScope": false
3193
+ },
3189
3194
  "../src/migrations/execute/index.ts": {
3190
3195
  "version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
3191
3196
  "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
@@ -5951,6 +5956,9 @@
5951
5956
  "../src/migrations/1682475704295-subscriptions_v3.ts": [
5952
5957
  "../node_modules/typeorm/index.d.ts"
5953
5958
  ],
5959
+ "../src/migrations/1682691040003-code-in-plan.ts": [
5960
+ "../node_modules/typeorm/index.d.ts"
5961
+ ],
5954
5962
  "../src/migrations/execute/index.ts": [
5955
5963
  "../src/config/connect.ts"
5956
5964
  ],
@@ -8571,6 +8579,9 @@
8571
8579
  "../src/migrations/1682475704295-subscriptions_v3.ts": [
8572
8580
  "../node_modules/typeorm/index.d.ts"
8573
8581
  ],
8582
+ "../src/migrations/1682691040003-code-in-plan.ts": [
8583
+ "../node_modules/typeorm/index.d.ts"
8584
+ ],
8574
8585
  "../src/migrations/index.ts": [
8575
8586
  "../src/migrations/1628474597284-initialschema.ts",
8576
8587
  "../src/migrations/1630077596132-removemangopay.ts",
@@ -9353,6 +9364,7 @@
9353
9364
  "../src/migrations/1681765500644-template-auth-fix.ts",
9354
9365
  "../src/migrations/1681967226231-subscriptions_v2.ts",
9355
9366
  "../src/migrations/1682475704295-subscriptions_v3.ts",
9367
+ "../src/migrations/1682691040003-code-in-plan.ts",
9356
9368
  "../src/migrations/execute/index.ts",
9357
9369
  "../src/migrations/index.ts",
9358
9370
  "../src/repositories/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "reachu-database",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -21,8 +21,8 @@
21
21
  "author": "reachu",
22
22
  "license": "ISC",
23
23
  "dependencies": {
24
- "@reachu/logger": "1.0.44",
25
- "@reachu/utils": "1.0.44",
24
+ "@reachu/logger": "1.0.46",
25
+ "@reachu/utils": "1.0.46",
26
26
  "dotenv": "8.0.0",
27
27
  "express": "4.17.1",
28
28
  "mysql2": "1.5.2",
@@ -23,6 +23,9 @@ export default class Plan extends AuditedModel {
23
23
  @Column('varchar', { nullable: true })
24
24
  description: string;
25
25
 
26
+ @Column('varchar', { nullable: true })
27
+ code: string;
28
+
26
29
  @Column('varchar', { nullable: true })
27
30
  originId: string;
28
31
 
@@ -0,0 +1,16 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class codeInPlan1682691040003 implements MigrationInterface {
4
+ name = 'codeInPlan1682691040003'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`DROP INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` ON \`user\``);
8
+ await queryRunner.query(`ALTER TABLE \`plan\` ADD \`code\` varchar(255) NULL`);
9
+ }
10
+
11
+ public async down(queryRunner: QueryRunner): Promise<void> {
12
+ await queryRunner.query(`ALTER TABLE \`plan\` DROP COLUMN \`code\``);
13
+ await queryRunner.query(`CREATE UNIQUE INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` ON \`user\` (\`user_count_plan_id\`)`);
14
+ }
15
+
16
+ }