@reachu/database 1.0.91 → 1.0.93
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/ImportedProduct.d.ts +2 -0
- package/dist/entity/ImportedProduct.js +6 -0
- package/dist/entity/ImportedProduct.js.map +1 -1
- package/dist/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.d.ts +6 -0
- package/dist/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.js +31 -0
- package/dist/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.js.map +1 -0
- package/dist/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.d.ts +6 -0
- package/dist/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.js +31 -0
- package/dist/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +28 -2
- package/package.json +3 -3
- package/src/entity/ImportedProduct.ts +5 -0
- package/src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts +16 -0
- package/src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts +16 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Product } from './Product.entity';
|
|
2
2
|
import User from './User';
|
|
3
|
+
import ChannelUser from './ChannelUser';
|
|
3
4
|
export default class ImportedProduct {
|
|
4
5
|
id: number;
|
|
5
6
|
deletedAt: Date;
|
|
@@ -11,4 +12,5 @@ export default class ImportedProduct {
|
|
|
11
12
|
profileId?: string;
|
|
12
13
|
profileWooId?: string;
|
|
13
14
|
woltId?: string;
|
|
15
|
+
channelUser: ChannelUser;
|
|
14
16
|
}
|
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
16
|
const Product_entity_1 = require("./Product.entity");
|
|
17
17
|
const User_1 = __importDefault(require("./User"));
|
|
18
|
+
const ChannelUser_1 = __importDefault(require("./ChannelUser"));
|
|
18
19
|
let ImportedProduct = class ImportedProduct {
|
|
19
20
|
};
|
|
20
21
|
__decorate([
|
|
@@ -59,6 +60,11 @@ __decorate([
|
|
|
59
60
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
60
61
|
__metadata("design:type", String)
|
|
61
62
|
], ImportedProduct.prototype, "woltId", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
typeorm_1.ManyToOne(() => ChannelUser_1.default, { nullable: true }),
|
|
65
|
+
typeorm_1.JoinColumn(),
|
|
66
|
+
__metadata("design:type", ChannelUser_1.default)
|
|
67
|
+
], ImportedProduct.prototype, "channelUser", void 0);
|
|
62
68
|
ImportedProduct = __decorate([
|
|
63
69
|
typeorm_1.Entity()
|
|
64
70
|
], ImportedProduct);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportedProduct.js","sourceRoot":"","sources":["../../src/entity/ImportedProduct.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,qDAA2C;AAC3C,kDAA0B;
|
|
1
|
+
{"version":3,"file":"ImportedProduct.js","sourceRoot":"","sources":["../../src/entity/ImportedProduct.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,qDAA2C;AAC3C,kDAA0B;AAC1B,gEAAwC;AAGxC,IAAqB,eAAe,GAApC,MAAqB,eAAe;CAoCnC,CAAA;AAlCC;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,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACtB;AAGf;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACf;AAGvB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kDACnB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;qDAChB;AAGtB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACtB;AAIhB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,qBAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAChD,oBAAU,EAAE;8BACA,qBAAW;oDAAC;AAnCN,eAAe;IADnC,gBAAM,EAAE;GACY,eAAe,CAoCnC;kBApCoB,eAAe"}
|
package/dist/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class migrationPreDevelopUserChannelExportedProduct1688921300692 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.migrationPreDevelopUserChannelExportedProduct1688921300692 = void 0;
|
|
13
|
+
class migrationPreDevelopUserChannelExportedProduct1688921300692 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'migrationPreDevelopUserChannelExportedProduct1688921300692';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`imported_product\` ADD \`channel_user_id\` int NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`imported_product\` DROP COLUMN \`channel_user_id\``);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.migrationPreDevelopUserChannelExportedProduct1688921300692 = migrationPreDevelopUserChannelExportedProduct1688921300692;
|
|
31
|
+
//# sourceMappingURL=1688921300692-migration-pre-develop-user-channel-exported-product.js.map
|
package/dist/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1688921300692-migration-pre-develop-user-channel-exported-product.js","sourceRoot":"","sources":["../../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,0DAA0D;IAAvE;QACI,SAAI,GAAG,4DAA4D,CAAA;IAYvE,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;YAC7F,MAAM,WAAW,CAAC,KAAK,CAAC,0LAA0L,CAAC,CAAC;QACxN,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;YAChH,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;QAChG,CAAC;KAAA;CAEJ;AAbD,gIAaC"}
|
package/dist/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class migrationPreDevelopUserChannelExportedProductV11688925248106 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
package/dist/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.js
ADDED
|
@@ -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.migrationPreDevelopUserChannelExportedProductV11688925248106 = void 0;
|
|
13
|
+
class migrationPreDevelopUserChannelExportedProductV11688925248106 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'migrationPreDevelopUserChannelExportedProductV11688925248106';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.migrationPreDevelopUserChannelExportedProductV11688925248106 = migrationPreDevelopUserChannelExportedProductV11688925248106;
|
|
31
|
+
//# sourceMappingURL=1688925248106-migration-pre-develop-user-channel-exported-product_v1.js.map
|
package/dist/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1688925248106-migration-pre-develop-user-channel-exported-product_v1.js","sourceRoot":"","sources":["../../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,4DAA4D;IAAzE;QACI,SAAI,GAAG,8DAA8D,CAAA;IAYzE,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;YAChH,MAAM,WAAW,CAAC,KAAK,CAAC,kMAAkM,CAAC,CAAC;QAChO,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;YAChH,MAAM,WAAW,CAAC,KAAK,CAAC,0LAA0L,CAAC,CAAC;QACxN,CAAC;KAAA;CAEJ;AAbD,oIAaC"}
|
|
@@ -2417,8 +2417,8 @@
|
|
|
2417
2417
|
"affectsGlobalScope": false
|
|
2418
2418
|
},
|
|
2419
2419
|
"../src/entity/importedproduct.ts": {
|
|
2420
|
-
"version": "
|
|
2421
|
-
"signature": "
|
|
2420
|
+
"version": "8f9cb6bf66f203519c1a2ed09c997d132eb401ee0108b5042751ca556d89c966",
|
|
2421
|
+
"signature": "e9b48b9b5b47f7a3626ba1ccec58d7fc386dbf08561909014a88e31bd29ce697",
|
|
2422
2422
|
"affectsGlobalScope": false
|
|
2423
2423
|
},
|
|
2424
2424
|
"../src/staticdata/currency.ts": {
|
|
@@ -3361,6 +3361,16 @@
|
|
|
3361
3361
|
"signature": "8cd3f783cc6a2fd4f9fe1ae4da675196568d5f2a62545c4c91e12103646af565",
|
|
3362
3362
|
"affectsGlobalScope": false
|
|
3363
3363
|
},
|
|
3364
|
+
"../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts": {
|
|
3365
|
+
"version": "9b9cee6a0cc11c9ec51b962475c76d5b78fcbf941b3ab55481d61a33b13fe7f0",
|
|
3366
|
+
"signature": "53e4d5e2b2e9623e8a61007157cde5956f1368bdf158306b57be2cfdbbdde00a",
|
|
3367
|
+
"affectsGlobalScope": false
|
|
3368
|
+
},
|
|
3369
|
+
"../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts": {
|
|
3370
|
+
"version": "69e93407c49dffe8795c8c7fec9a867e82f050a46b40dd24c6b7739d37e5b33a",
|
|
3371
|
+
"signature": "83be3e186c96540835f05f393d7534975aba88bda33144528025fe6a2e7c282b",
|
|
3372
|
+
"affectsGlobalScope": false
|
|
3373
|
+
},
|
|
3364
3374
|
"../src/migrations/execute/index.ts": {
|
|
3365
3375
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3366
3376
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -5476,6 +5486,7 @@
|
|
|
5476
5486
|
],
|
|
5477
5487
|
"../src/entity/importedproduct.ts": [
|
|
5478
5488
|
"../node_modules/typeorm/index.d.ts",
|
|
5489
|
+
"../src/entity/channeluser.ts",
|
|
5479
5490
|
"../src/entity/product.entity.ts",
|
|
5480
5491
|
"../src/entity/user.ts"
|
|
5481
5492
|
],
|
|
@@ -6250,6 +6261,12 @@
|
|
|
6250
6261
|
"../src/migrations/1688489173526-add-webhook-template.ts": [
|
|
6251
6262
|
"../node_modules/typeorm/index.d.ts"
|
|
6252
6263
|
],
|
|
6264
|
+
"../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts": [
|
|
6265
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6266
|
+
],
|
|
6267
|
+
"../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts": [
|
|
6268
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6269
|
+
],
|
|
6253
6270
|
"../src/migrations/execute/index.ts": [
|
|
6254
6271
|
"../src/config/connect.ts"
|
|
6255
6272
|
],
|
|
@@ -8313,6 +8330,7 @@
|
|
|
8313
8330
|
"../src/entity/product.entity.ts"
|
|
8314
8331
|
],
|
|
8315
8332
|
"../src/entity/importedproduct.ts": [
|
|
8333
|
+
"../src/entity/channeluser.ts",
|
|
8316
8334
|
"../src/entity/product.entity.ts",
|
|
8317
8335
|
"../src/entity/user.ts"
|
|
8318
8336
|
],
|
|
@@ -8994,6 +9012,12 @@
|
|
|
8994
9012
|
"../src/migrations/1688489173526-add-webhook-template.ts": [
|
|
8995
9013
|
"../node_modules/typeorm/index.d.ts"
|
|
8996
9014
|
],
|
|
9015
|
+
"../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts": [
|
|
9016
|
+
"../node_modules/typeorm/index.d.ts"
|
|
9017
|
+
],
|
|
9018
|
+
"../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts": [
|
|
9019
|
+
"../node_modules/typeorm/index.d.ts"
|
|
9020
|
+
],
|
|
8997
9021
|
"../src/migrations/index.ts": [
|
|
8998
9022
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8999
9023
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9815,6 +9839,8 @@
|
|
|
9815
9839
|
"../src/migrations/1687997223199-migration-pre-develop-api-key-channel.ts",
|
|
9816
9840
|
"../src/migrations/1688049065964-add-title-endpoint.ts",
|
|
9817
9841
|
"../src/migrations/1688489173526-add-webhook-template.ts",
|
|
9842
|
+
"../src/migrations/1688921300692-migration-pre-develop-user-channel-exported-product.ts",
|
|
9843
|
+
"../src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts",
|
|
9818
9844
|
"../src/migrations/execute/index.ts",
|
|
9819
9845
|
"../src/migrations/index.ts",
|
|
9820
9846
|
"../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.93",
|
|
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.93",
|
|
25
|
+
"@reachu/utils": "1.0.93",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from 'typeorm';
|
|
9
9
|
import { Product } from './Product.entity';
|
|
10
10
|
import User from './User';
|
|
11
|
+
import ChannelUser from './ChannelUser';
|
|
11
12
|
|
|
12
13
|
@Entity()
|
|
13
14
|
export default class ImportedProduct {
|
|
@@ -42,4 +43,8 @@ export default class ImportedProduct {
|
|
|
42
43
|
|
|
43
44
|
@Column('varchar', { nullable: true })
|
|
44
45
|
woltId?: string;
|
|
46
|
+
|
|
47
|
+
@ManyToOne(() => ChannelUser, { nullable: true })
|
|
48
|
+
@JoinColumn()
|
|
49
|
+
channelUser: ChannelUser;
|
|
45
50
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class migrationPreDevelopUserChannelExportedProduct1688921300692 implements MigrationInterface {
|
|
4
|
+
name = 'migrationPreDevelopUserChannelExportedProduct1688921300692'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`imported_product\` ADD \`channel_user_id\` int NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`imported_product\` DROP COLUMN \`channel_user_id\``);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|
package/src/migrations/1688925248106-migration-pre-develop-user-channel-exported-product_v1.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class migrationPreDevelopUserChannelExportedProductV11688925248106 implements MigrationInterface {
|
|
4
|
+
name = 'migrationPreDevelopUserChannelExportedProductV11688925248106'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`imported_product\` DROP FOREIGN KEY \`FK_f8bdfc8b3e1fdf9e96a351d73e2\``);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`imported_product\` ADD CONSTRAINT \`FK_f8bdfc8b3e1fdf9e96a351d73e2\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|