@reachu/database 1.0.217 → 1.0.219

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.
@@ -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: false }),
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,KAAK,EAAE,CAAC;IAClF,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"}
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"}
@@ -8,6 +8,7 @@ export default class ImportedProduct {
8
8
  user: User;
9
9
  product: Product;
10
10
  shopifyId?: number;
11
+ bigcommerceId?: string | number;
11
12
  magentoId?: string | number;
12
13
  magentoSku?: string;
13
14
  profileMagentoId?: string;
@@ -41,6 +41,10 @@ __decorate([
41
41
  typeorm_1.Column('bigint', { nullable: true }),
42
42
  __metadata("design:type", Number)
43
43
  ], ImportedProduct.prototype, "shopifyId", void 0);
44
+ __decorate([
45
+ typeorm_1.Column('varchar', { nullable: true }),
46
+ __metadata("design:type", Object)
47
+ ], ImportedProduct.prototype, "bigcommerceId", void 0);
44
48
  __decorate([
45
49
  typeorm_1.Column('varchar', { nullable: true }),
46
50
  __metadata("design:type", Object)
@@ -1 +1 @@
1
- {"version":3,"file":"ImportedProduct.js","sourceRoot":"","sources":["../../src/entity/ImportedProduct.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,qDAA2C;AAC3C,kDAA0B;AAC1B,gEAAwC;AACxC,gEAAwC;AAGxC,IAAqB,eAAe,GAApC,MAAqB,eAAe;CA0DnC,CAAA;AAxDC;IADC,gCAAsB,EAAE;;2CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;kDAAC;AAIhB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC3D,oBAAU,EAAE;8BACP,cAAI;6CAAC;AAIX;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC9D,oBAAU,EAAE;8BACJ,wBAAO;gDAAC;AAGjB;IADC,gBAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDAClB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACV;AAG5B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAClB;AAGpB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDACZ;AAG1B;IADC,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CAAC;;kDACnB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAChB;AAItB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,qBAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAChD,oBAAU,EAAE;8BACA,qBAAW;oDAAC;AAIzB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,qBAAW,EAAE,CAAC,IAAiB,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC5F,oBAAU,EAAE;;oDACc;AAG3B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACnB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+DACN;AA5Db,eAAe;IADnC,gBAAM,EAAE;GACY,eAAe,CA6DnC;kBA7DoB,eAAe"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class bigcommerce21759863524877 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -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"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+ export declare class bigcommerceImportedproduct1760110412811 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -0,0 +1,29 @@
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.bigcommerceImportedproduct1760110412811 = void 0;
13
+ class bigcommerceImportedproduct1760110412811 {
14
+ constructor() {
15
+ this.name = 'bigcommerceImportedproduct1760110412811';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` ADD \`bigcommerce_id\` varchar(255) NULL`);
20
+ });
21
+ }
22
+ down(queryRunner) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ yield queryRunner.query(`ALTER TABLE \`imported_product\` DROP COLUMN \`bigcommerce_id\``);
25
+ });
26
+ }
27
+ }
28
+ exports.bigcommerceImportedproduct1760110412811 = bigcommerceImportedproduct1760110412811;
29
+ //# sourceMappingURL=1760110412811-bigcommerce-importedproduct.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1760110412811-bigcommerce-importedproduct.js","sourceRoot":"","sources":["../../src/migrations/1760110412811-bigcommerce-importedproduct.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,uCAAuC;IAApD;QACE,SAAI,GAAG,yCAAyC,CAAC;IAWnD,CAAC;IATc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,2EAA2E,CAC5E,CAAC;QACJ,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;QAC7F,CAAC;KAAA;CACF;AAZD,0FAYC"}
@@ -2432,8 +2432,8 @@
2432
2432
  "affectsGlobalScope": false
2433
2433
  },
2434
2434
  "../src/entity/importedproduct.ts": {
2435
- "version": "b5c22ca0cbe741a4da47a5a634e36d05af351cfb253fbb2220c7654aec53b260",
2436
- "signature": "4475d00d18bdfb389078f4f3b6378a980a2d95d0391e91e3683faef3e7503ffb",
2435
+ "version": "e73604694f6a1192a09f4fdfe30d8b1349878356ef33ca3abe9dbbe2d6da31cd",
2436
+ "signature": "e29b370f4f645c10ba2f290ec2628caddc709b57f81e2f6857b2fd49794693dd",
2437
2437
  "affectsGlobalScope": false
2438
2438
  },
2439
2439
  "../src/staticdata/currency.ts": {
@@ -2672,7 +2672,7 @@
2672
2672
  "affectsGlobalScope": false
2673
2673
  },
2674
2674
  "../src/entity/bigcommerceconnection.ts": {
2675
- "version": "c831b15a93e2a21bdd96e2f660456ebb108a0521598f31e7e828dcdd5bf09a3d",
2675
+ "version": "28efd81db6ab0ad754966605871e37b437181be843b3f923ae4bd3fef6d8f9de",
2676
2676
  "signature": "51d0a351e40aef09b6d8a0eb370a0ffa203134688e2d0b704ce7d0c54cc71059",
2677
2677
  "affectsGlobalScope": false
2678
2678
  },
@@ -3951,6 +3951,16 @@
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
+ },
3959
+ "../src/migrations/1760110412811-bigcommerce-importedproduct.ts": {
3960
+ "version": "911d1e8cbd5f0ba04b5e9bd2850a013310330655036655858323ebcbf0d6ab8d",
3961
+ "signature": "fae3c30319932761b9014d472ddca7b9183bb5bd38ea466f733405624e578b54",
3962
+ "affectsGlobalScope": false
3963
+ },
3954
3964
  "../src/migrations/execute/index.ts": {
3955
3965
  "version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
3956
3966
  "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
@@ -7254,6 +7264,12 @@
7254
7264
  "../src/migrations/1759861820422-bigcommerce.ts": [
7255
7265
  "../node_modules/typeorm/index.d.ts"
7256
7266
  ],
7267
+ "../src/migrations/1759863524877-bigcommerce2.ts": [
7268
+ "../node_modules/typeorm/index.d.ts"
7269
+ ],
7270
+ "../src/migrations/1760110412811-bigcommerce-importedproduct.ts": [
7271
+ "../node_modules/typeorm/index.d.ts"
7272
+ ],
7257
7273
  "../src/migrations/execute/index.ts": [
7258
7274
  "../src/config/connect.ts"
7259
7275
  ],
@@ -10418,6 +10434,12 @@
10418
10434
  "../src/migrations/1759861820422-bigcommerce.ts": [
10419
10435
  "../node_modules/typeorm/index.d.ts"
10420
10436
  ],
10437
+ "../src/migrations/1759863524877-bigcommerce2.ts": [
10438
+ "../node_modules/typeorm/index.d.ts"
10439
+ ],
10440
+ "../src/migrations/1760110412811-bigcommerce-importedproduct.ts": [
10441
+ "../node_modules/typeorm/index.d.ts"
10442
+ ],
10421
10443
  "../src/migrations/index.ts": [
10422
10444
  "../src/migrations/1628474597284-initialschema.ts",
10423
10445
  "../src/migrations/1630077596132-removemangopay.ts",
@@ -11382,6 +11404,8 @@
11382
11404
  "../src/migrations/1758897566987-liveshow-to-campaign.ts",
11383
11405
  "../src/migrations/1759180701543-components.ts",
11384
11406
  "../src/migrations/1759861820422-bigcommerce.ts",
11407
+ "../src/migrations/1759863524877-bigcommerce2.ts",
11408
+ "../src/migrations/1760110412811-bigcommerce-importedproduct.ts",
11385
11409
  "../src/migrations/execute/index.ts",
11386
11410
  "../src/migrations/index.ts",
11387
11411
  "../src/repositories/discount/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.217",
3
+ "version": "1.0.219",
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.217",
25
- "@reachu/utils": "1.0.217",
24
+ "@reachu/logger": "1.0.219",
25
+ "@reachu/utils": "1.0.219",
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: false })
22
+ @ManyToOne(() => User, (user) => user.id, { onDelete: 'CASCADE', nullable: true })
23
23
  @JoinColumn()
24
24
  user: User;
25
25
 
@@ -31,6 +31,9 @@ export default class ImportedProduct {
31
31
  @Column('bigint', { nullable: true })
32
32
  shopifyId?: number;
33
33
 
34
+ @Column('varchar', { nullable: true })
35
+ bigcommerceId?: string | number;
36
+
34
37
  @Column('varchar', { nullable: true })
35
38
  magentoId?: string | number;
36
39
 
@@ -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
+ }
@@ -0,0 +1,15 @@
1
+ import { MigrationInterface, QueryRunner } from 'typeorm';
2
+
3
+ export class bigcommerceImportedproduct1760110412811 implements MigrationInterface {
4
+ name = 'bigcommerceImportedproduct1760110412811';
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(
8
+ `ALTER TABLE \`imported_product\` ADD \`bigcommerce_id\` varchar(255) NULL`,
9
+ );
10
+ }
11
+
12
+ public async down(queryRunner: QueryRunner): Promise<void> {
13
+ await queryRunner.query(`ALTER TABLE \`imported_product\` DROP COLUMN \`bigcommerce_id\``);
14
+ }
15
+ }