@reachu/database 1.0.217 → 1.0.218
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/BigcommerceConnection.js +1 -1
- package/dist/entity/BigcommerceConnection.js.map +1 -1
- package/dist/migrations/1759863524877-bigcommerce2.d.ts +6 -0
- package/dist/migrations/1759863524877-bigcommerce2.js +33 -0
- package/dist/migrations/1759863524877-bigcommerce2.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +13 -1
- package/package.json +3 -3
- package/src/entity/BigcommerceConnection.ts +1 -1
- package/src/migrations/1759863524877-bigcommerce2.ts +29 -0
|
@@ -26,7 +26,7 @@ __decorate([
|
|
|
26
26
|
__metadata("design:type", Date)
|
|
27
27
|
], BigcommerceConnection.prototype, "deletedAt", void 0);
|
|
28
28
|
__decorate([
|
|
29
|
-
typeorm_1.ManyToOne(() => User_1.default, (user) => user.id, { onDelete: 'CASCADE', nullable:
|
|
29
|
+
typeorm_1.ManyToOne(() => User_1.default, (user) => user.id, { onDelete: 'CASCADE', nullable: true }),
|
|
30
30
|
typeorm_1.JoinColumn(),
|
|
31
31
|
__metadata("design:type", User_1.default)
|
|
32
32
|
], BigcommerceConnection.prototype, "user", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BigcommerceConnection.js","sourceRoot":"","sources":["../../src/entity/BigcommerceConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCASiB;AACjB,kDAA0B;AAC1B,kEAA0C;AAG1C,IAAqB,qBAAqB,GAA1C,MAAqB,qBAAsB,SAAQ,sBAAY;CAsB9D,CAAA;AApBC;IADC,gCAAsB,EAAE;;iDACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;wDAAC;AAIhB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"BigcommerceConnection.js","sourceRoot":"","sources":["../../src/entity/BigcommerceConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCASiB;AACjB,kDAA0B;AAC1B,kEAA0C;AAG1C,IAAqB,qBAAqB,GAA1C,MAAqB,qBAAsB,SAAQ,sBAAY;CAsB9D,CAAA;AApBC;IADC,gCAAsB,EAAE;;iDACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;wDAAC;AAIhB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACjF,oBAAU,EAAE;8BACP,cAAI;mDAAC;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;0DACnB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;0DACnB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;wDACrB;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;yDACnB;AArBD,qBAAqB;IADzC,gBAAM,EAAE;GACY,qBAAqB,CAsBzC;kBAtBoB,qBAAqB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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.bigcommerce21759863524877 = void 0;
|
|
13
|
+
class bigcommerce21759863524877 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'bigcommerce21759863524877';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`bigcommerce_connection\` DROP FOREIGN KEY \`FK_e80315556dd2938d5014cd5237c\``);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`bigcommerce_connection\` CHANGE \`user_id\` \`user_id\` int NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`bigcommerce_connection\` ADD CONSTRAINT \`FK_e80315556dd2938d5014cd5237c\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
down(queryRunner) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`bigcommerce_connection\` DROP FOREIGN KEY \`FK_e80315556dd2938d5014cd5237c\``);
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`bigcommerce_connection\` CHANGE \`user_id\` \`user_id\` int NOT NULL`);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`bigcommerce_connection\` ADD CONSTRAINT \`FK_e80315556dd2938d5014cd5237c\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.bigcommerce21759863524877 = bigcommerce21759863524877;
|
|
33
|
+
//# sourceMappingURL=1759863524877-bigcommerce2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1759863524877-bigcommerce2.js","sourceRoot":"","sources":["../../src/migrations/1759863524877-bigcommerce2.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,yBAAyB;IAAtC;QACE,SAAI,GAAG,2BAA2B,CAAC;IAyBrC,CAAC;IAvBc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,4FAA4F,CAC7F,CAAC;YACF,MAAM,WAAW,CAAC,KAAK,CACrB,gFAAgF,CACjF,CAAC;YACF,MAAM,WAAW,CAAC,KAAK,CACrB,sLAAsL,CACvL,CAAC;QACJ,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CACrB,4FAA4F,CAC7F,CAAC;YACF,MAAM,WAAW,CAAC,KAAK,CACrB,oFAAoF,CACrF,CAAC;YACF,MAAM,WAAW,CAAC,KAAK,CACrB,sLAAsL,CACvL,CAAC;QACJ,CAAC;KAAA;CACF;AA1BD,8DA0BC"}
|
|
@@ -2672,7 +2672,7 @@
|
|
|
2672
2672
|
"affectsGlobalScope": false
|
|
2673
2673
|
},
|
|
2674
2674
|
"../src/entity/bigcommerceconnection.ts": {
|
|
2675
|
-
"version": "
|
|
2675
|
+
"version": "28efd81db6ab0ad754966605871e37b437181be843b3f923ae4bd3fef6d8f9de",
|
|
2676
2676
|
"signature": "51d0a351e40aef09b6d8a0eb370a0ffa203134688e2d0b704ce7d0c54cc71059",
|
|
2677
2677
|
"affectsGlobalScope": false
|
|
2678
2678
|
},
|
|
@@ -3951,6 +3951,11 @@
|
|
|
3951
3951
|
"signature": "89615be2ae9dfd23fb9f302545831355b2f5b13956322252ffbe21778c173558",
|
|
3952
3952
|
"affectsGlobalScope": false
|
|
3953
3953
|
},
|
|
3954
|
+
"../src/migrations/1759863524877-bigcommerce2.ts": {
|
|
3955
|
+
"version": "c40eb37b3fc026d46365925c406a63f8c5f7553671dca896db3af9751976e6e7",
|
|
3956
|
+
"signature": "2313670db5624a62c2e192823612fae34cae5f5c2096c6cf2d2efa3087eabf8e",
|
|
3957
|
+
"affectsGlobalScope": false
|
|
3958
|
+
},
|
|
3954
3959
|
"../src/migrations/execute/index.ts": {
|
|
3955
3960
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3956
3961
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -7254,6 +7259,9 @@
|
|
|
7254
7259
|
"../src/migrations/1759861820422-bigcommerce.ts": [
|
|
7255
7260
|
"../node_modules/typeorm/index.d.ts"
|
|
7256
7261
|
],
|
|
7262
|
+
"../src/migrations/1759863524877-bigcommerce2.ts": [
|
|
7263
|
+
"../node_modules/typeorm/index.d.ts"
|
|
7264
|
+
],
|
|
7257
7265
|
"../src/migrations/execute/index.ts": [
|
|
7258
7266
|
"../src/config/connect.ts"
|
|
7259
7267
|
],
|
|
@@ -10418,6 +10426,9 @@
|
|
|
10418
10426
|
"../src/migrations/1759861820422-bigcommerce.ts": [
|
|
10419
10427
|
"../node_modules/typeorm/index.d.ts"
|
|
10420
10428
|
],
|
|
10429
|
+
"../src/migrations/1759863524877-bigcommerce2.ts": [
|
|
10430
|
+
"../node_modules/typeorm/index.d.ts"
|
|
10431
|
+
],
|
|
10421
10432
|
"../src/migrations/index.ts": [
|
|
10422
10433
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
10423
10434
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -11382,6 +11393,7 @@
|
|
|
11382
11393
|
"../src/migrations/1758897566987-liveshow-to-campaign.ts",
|
|
11383
11394
|
"../src/migrations/1759180701543-components.ts",
|
|
11384
11395
|
"../src/migrations/1759861820422-bigcommerce.ts",
|
|
11396
|
+
"../src/migrations/1759863524877-bigcommerce2.ts",
|
|
11385
11397
|
"../src/migrations/execute/index.ts",
|
|
11386
11398
|
"../src/migrations/index.ts",
|
|
11387
11399
|
"../src/repositories/discount/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.218",
|
|
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.218",
|
|
25
|
+
"@reachu/utils": "1.0.218",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"eventemitter2": "^6.4.9",
|
|
28
28
|
"express": "4.17.1",
|
|
@@ -19,7 +19,7 @@ export default class BigcommerceConnection extends AuditedModel {
|
|
|
19
19
|
@DeleteDateColumn()
|
|
20
20
|
deletedAt: Date;
|
|
21
21
|
|
|
22
|
-
@ManyToOne(() => User, (user) => user.id, { onDelete: 'CASCADE', nullable:
|
|
22
|
+
@ManyToOne(() => User, (user) => user.id, { onDelete: 'CASCADE', nullable: true })
|
|
23
23
|
@JoinColumn()
|
|
24
24
|
user: User;
|
|
25
25
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
export class bigcommerce21759863524877 implements MigrationInterface {
|
|
4
|
+
name = 'bigcommerce21759863524877';
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(
|
|
8
|
+
`ALTER TABLE \`bigcommerce_connection\` DROP FOREIGN KEY \`FK_e80315556dd2938d5014cd5237c\``,
|
|
9
|
+
);
|
|
10
|
+
await queryRunner.query(
|
|
11
|
+
`ALTER TABLE \`bigcommerce_connection\` CHANGE \`user_id\` \`user_id\` int NULL`,
|
|
12
|
+
);
|
|
13
|
+
await queryRunner.query(
|
|
14
|
+
`ALTER TABLE \`bigcommerce_connection\` ADD CONSTRAINT \`FK_e80315556dd2938d5014cd5237c\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
19
|
+
await queryRunner.query(
|
|
20
|
+
`ALTER TABLE \`bigcommerce_connection\` DROP FOREIGN KEY \`FK_e80315556dd2938d5014cd5237c\``,
|
|
21
|
+
);
|
|
22
|
+
await queryRunner.query(
|
|
23
|
+
`ALTER TABLE \`bigcommerce_connection\` CHANGE \`user_id\` \`user_id\` int NOT NULL`,
|
|
24
|
+
);
|
|
25
|
+
await queryRunner.query(
|
|
26
|
+
`ALTER TABLE \`bigcommerce_connection\` ADD CONSTRAINT \`FK_e80315556dd2938d5014cd5237c\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`,
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|