@reachu/database 1.0.75 → 1.0.76
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/dist/entity/ExternalRequest.d.ts +1 -1
- package/dist/entity/ExternalRequest.js +3 -3
- package/dist/entity/ExternalRequest.js.map +1 -1
- package/dist/migrations/1685128263295-external-request-update.d.ts +6 -0
- package/dist/migrations/1685128263295-external-request-update.js +45 -0
- package/dist/migrations/1685128263295-external-request-update.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +14 -2
- package/package.json +3 -3
- package/src/entity/ExternalRequest.ts +5 -5
- package/src/migrations/1685128263295-external-request-update.ts +30 -0
|
@@ -37,9 +37,9 @@ __decorate([
|
|
|
37
37
|
__metadata("design:type", String)
|
|
38
38
|
], ExternalRequest.prototype, "receiverEmail", void 0);
|
|
39
39
|
__decorate([
|
|
40
|
-
typeorm_1.Column('
|
|
41
|
-
__metadata("design:type",
|
|
42
|
-
], ExternalRequest.prototype, "
|
|
40
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], ExternalRequest.prototype, "collectionIds", void 0);
|
|
43
43
|
__decorate([
|
|
44
44
|
typeorm_1.Column('varchar'),
|
|
45
45
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExternalRequest.js","sourceRoot":"","sources":["../../src/entity/ExternalRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAwF;AACxF,kEAA0C;AAC1C,
|
|
1
|
+
{"version":3,"file":"ExternalRequest.js","sourceRoot":"","sources":["../../src/entity/ExternalRequest.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAwF;AACxF,kEAA0C;AAC1C,wEAAgD;AAChD,kDAA0B;AAG1B,IAAqB,eAAe,GAApC,MAAqB,eAAgB,SAAQ,sBAAY;CA0BxD,CAAA;AAxBC;IADC,gCAAsB,EAAE;;2CACd;AAIX;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC3D,oBAAU,EAAE;8BACL,cAAI;+CAAC;AAIb;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC3D,oBAAU,EAAE;8BACP,cAAI;6CAAC;AAGX;IADC,gBAAM,CAAC,SAAS,CAAC;;sDACI;AAGtB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAChB;AAGtB;IADC,gBAAM,CAAC,SAAS,CAAC;;4CACN;AAMZ;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8CACpC;AAzBK,eAAe;IADnC,gBAAM,EAAE;GACY,eAAe,CA0BnC;kBA1BoB,eAAe"}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.externalRequestUpdate1685128263295 = void 0;
|
|
13
|
+
class externalRequestUpdate1685128263295 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'externalRequestUpdate1685128263295';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`DROP INDEX \`IDX_9499974cf522429803e172a627\` ON \`shopify_connection\``);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD UNIQUE INDEX \`IDX_9499974cf522429803e172a627\` (\`reseller_id\`)`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD UNIQUE INDEX \`IDX_98158a497be5c13a12fad50554\` (\`supplier_id\`)`);
|
|
22
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`IDX_db41f18c3701a209c734457fa3\` ON \`shopify_connection\` (\`reseller_id\`, \`deleted_at\`)`);
|
|
23
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`IDX_dbb543b4ed601764a19df997bb\` ON \`shopify_connection\` (\`supplier_id\`, \`deleted_at\`)`);
|
|
24
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_9499974cf522429803e172a627\` ON \`shopify_connection\` (\`reseller_id\`)`);
|
|
25
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_98158a497be5c13a12fad50554\` ON \`shopify_connection\` (\`supplier_id\`)`);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD CONSTRAINT \`FK_9499974cf522429803e172a6276\` FOREIGN KEY (\`reseller_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD CONSTRAINT \`FK_98158a497be5c13a12fad50554a\` FOREIGN KEY (\`supplier_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
down(queryRunner) {
|
|
31
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP FOREIGN KEY \`FK_98158a497be5c13a12fad50554a\``);
|
|
33
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP FOREIGN KEY \`FK_9499974cf522429803e172a6276\``);
|
|
34
|
+
yield queryRunner.query(`DROP INDEX \`REL_98158a497be5c13a12fad50554\` ON \`shopify_connection\``);
|
|
35
|
+
yield queryRunner.query(`DROP INDEX \`REL_9499974cf522429803e172a627\` ON \`shopify_connection\``);
|
|
36
|
+
yield queryRunner.query(`DROP INDEX \`IDX_dbb543b4ed601764a19df997bb\` ON \`shopify_connection\``);
|
|
37
|
+
yield queryRunner.query(`DROP INDEX \`IDX_db41f18c3701a209c734457fa3\` ON \`shopify_connection\``);
|
|
38
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP INDEX \`IDX_98158a497be5c13a12fad50554\``);
|
|
39
|
+
yield queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP INDEX \`IDX_9499974cf522429803e172a627\``);
|
|
40
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`IDX_9499974cf522429803e172a627\` ON \`shopify_connection\` (\`reseller_id\`)`);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.externalRequestUpdate1685128263295 = externalRequestUpdate1685128263295;
|
|
45
|
+
//# sourceMappingURL=1685128263295-external-request-update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1685128263295-external-request-update.js","sourceRoot":"","sources":["../../src/migrations/1685128263295-external-request-update.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,kCAAkC;IAA/C;QACI,SAAI,GAAG,oCAAoC,CAAA;IA0B/C,CAAC;IAxBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YACnG,MAAM,WAAW,CA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bc7553a34265ea2ab94eafc161ecf7774aa",
|
|
2621
|
+
"signature": "0202c7298057e5574e890bf5fba91ac3a7e3b6d774ddb2acb1cd43fe7c8ab79f",
|
|
2622
2622
|
"affectsGlobalScope": false
|
|
2623
2623
|
},
|
|
2624
2624
|
"../src/entity/wallet.ts": {
|
|
@@ -3266,6 +3266,11 @@
|
|
|
3266
3266
|
"signature": "6869bda9a903b7fb311947f1f1b107a0f4e8ac8c4f1ca0613b77809276d20cef",
|
|
3267
3267
|
"affectsGlobalScope": false
|
|
3268
3268
|
},
|
|
3269
|
+
"../src/migrations/1685128263295-external-request-update.ts": {
|
|
3270
|
+
"version": "42a088cec62a5aec977d89940e5d2d842365f8d3eed0524839eb2591b991211b",
|
|
3271
|
+
"signature": "3911090dc53367cd46bdbd59297c8b2e5c1f55ab13960bd178302a448ff59315",
|
|
3272
|
+
"affectsGlobalScope": false
|
|
3273
|
+
},
|
|
3269
3274
|
"../src/migrations/execute/index.ts": {
|
|
3270
3275
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3271
3276
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -6090,6 +6095,9 @@
|
|
|
6090
6095
|
"../src/migrations/1684975416295-shopify-conn-2.ts": [
|
|
6091
6096
|
"../node_modules/typeorm/index.d.ts"
|
|
6092
6097
|
],
|
|
6098
|
+
"../src/migrations/1685128263295-external-request-update.ts": [
|
|
6099
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6100
|
+
],
|
|
6093
6101
|
"../src/migrations/execute/index.ts": [
|
|
6094
6102
|
"../src/config/connect.ts"
|
|
6095
6103
|
],
|
|
@@ -8769,6 +8777,9 @@
|
|
|
8769
8777
|
"../src/migrations/1684975416295-shopify-conn-2.ts": [
|
|
8770
8778
|
"../node_modules/typeorm/index.d.ts"
|
|
8771
8779
|
],
|
|
8780
|
+
"../src/migrations/1685128263295-external-request-update.ts": [
|
|
8781
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8782
|
+
],
|
|
8772
8783
|
"../src/migrations/index.ts": [
|
|
8773
8784
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8774
8785
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9570,6 +9581,7 @@
|
|
|
9570
9581
|
"../src/migrations/1684452476996-externalrequest_v2.ts",
|
|
9571
9582
|
"../src/migrations/1684935064606-shopify-conn.ts",
|
|
9572
9583
|
"../src/migrations/1684975416295-shopify-conn-2.ts",
|
|
9584
|
+
"../src/migrations/1685128263295-external-request-update.ts",
|
|
9573
9585
|
"../src/migrations/execute/index.ts",
|
|
9574
9586
|
"../src/migrations/index.ts",
|
|
9575
9587
|
"../src/repositories/index.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reachu/database",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.76",
|
|
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.
|
|
25
|
-
"@reachu/utils": "1.0.
|
|
24
|
+
"@reachu/logger": "1.0.76",
|
|
25
|
+
"@reachu/utils": "1.0.76",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Entity, PrimaryGeneratedColumn, Column, JoinColumn, ManyToOne } from 'typeorm';
|
|
2
2
|
import AuditedModel from './AuditedModel';
|
|
3
|
-
import Plan from './modules/subscriptions/Plan'
|
|
3
|
+
import Plan from './modules/subscriptions/Plan';
|
|
4
4
|
import User from './User';
|
|
5
5
|
|
|
6
6
|
@Entity()
|
|
@@ -18,10 +18,10 @@ export default class ExternalRequest extends AuditedModel {
|
|
|
18
18
|
|
|
19
19
|
@Column('varchar')
|
|
20
20
|
receiverEmail: string;
|
|
21
|
-
|
|
22
|
-
@Column('
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
|
|
22
|
+
@Column('varchar', { nullable: true })
|
|
23
|
+
collectionIds: string;
|
|
24
|
+
|
|
25
25
|
@Column('varchar')
|
|
26
26
|
url: string;
|
|
27
27
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class externalRequestUpdate1685128263295 implements MigrationInterface {
|
|
4
|
+
name = 'externalRequestUpdate1685128263295'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`DROP INDEX \`IDX_9499974cf522429803e172a627\` ON \`shopify_connection\``);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD UNIQUE INDEX \`IDX_9499974cf522429803e172a627\` (\`reseller_id\`)`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD UNIQUE INDEX \`IDX_98158a497be5c13a12fad50554\` (\`supplier_id\`)`);
|
|
10
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`IDX_db41f18c3701a209c734457fa3\` ON \`shopify_connection\` (\`reseller_id\`, \`deleted_at\`)`);
|
|
11
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`IDX_dbb543b4ed601764a19df997bb\` ON \`shopify_connection\` (\`supplier_id\`, \`deleted_at\`)`);
|
|
12
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`REL_9499974cf522429803e172a627\` ON \`shopify_connection\` (\`reseller_id\`)`);
|
|
13
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`REL_98158a497be5c13a12fad50554\` ON \`shopify_connection\` (\`supplier_id\`)`);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD CONSTRAINT \`FK_9499974cf522429803e172a6276\` FOREIGN KEY (\`reseller_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` ADD CONSTRAINT \`FK_98158a497be5c13a12fad50554a\` FOREIGN KEY (\`supplier_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
19
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP FOREIGN KEY \`FK_98158a497be5c13a12fad50554a\``);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP FOREIGN KEY \`FK_9499974cf522429803e172a6276\``);
|
|
21
|
+
await queryRunner.query(`DROP INDEX \`REL_98158a497be5c13a12fad50554\` ON \`shopify_connection\``);
|
|
22
|
+
await queryRunner.query(`DROP INDEX \`REL_9499974cf522429803e172a627\` ON \`shopify_connection\``);
|
|
23
|
+
await queryRunner.query(`DROP INDEX \`IDX_dbb543b4ed601764a19df997bb\` ON \`shopify_connection\``);
|
|
24
|
+
await queryRunner.query(`DROP INDEX \`IDX_db41f18c3701a209c734457fa3\` ON \`shopify_connection\``);
|
|
25
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP INDEX \`IDX_98158a497be5c13a12fad50554\``);
|
|
26
|
+
await queryRunner.query(`ALTER TABLE \`shopify_connection\` DROP INDEX \`IDX_9499974cf522429803e172a627\``);
|
|
27
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`IDX_9499974cf522429803e172a627\` ON \`shopify_connection\` (\`reseller_id\`)`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
}
|