@reachu/database 1.0.175 → 1.0.177
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 +1 -0
- package/dist/entity/ImportedProduct.js +4 -0
- package/dist/entity/ImportedProduct.js.map +1 -1
- package/dist/entity/ProductScraping.d.ts +2 -1
- package/dist/entity/ProductScraping.js +5 -1
- package/dist/entity/ProductScraping.js.map +1 -1
- package/dist/migrations/1714443774788-product_scraping.d.ts +6 -0
- package/dist/migrations/1714443774788-product_scraping.js +33 -0
- package/dist/migrations/1714443774788-product_scraping.js.map +1 -0
- package/dist/migrations/1714738807306-product_scraping_v1.d.ts +6 -0
- package/dist/migrations/1714738807306-product_scraping_v1.js +33 -0
- package/dist/migrations/1714738807306-product_scraping_v1.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +28 -4
- package/package.json +3 -3
- package/src/entity/ImportedProduct.ts +3 -0
- package/src/entity/ProductScraping.ts +4 -1
- package/src/migrations/1714443774788-product_scraping.ts +18 -0
- package/src/migrations/1714738807306-product_scraping_v1.ts +18 -0
|
@@ -53,6 +53,10 @@ __decorate([
|
|
|
53
53
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
54
54
|
__metadata("design:type", String)
|
|
55
55
|
], ImportedProduct.prototype, "profileMagentoId", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], ImportedProduct.prototype, "scrapingId", void 0);
|
|
56
60
|
__decorate([
|
|
57
61
|
typeorm_1.Column('bigint', { nullable: true }),
|
|
58
62
|
__metadata("design:type", Number)
|
|
@@ -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;
|
|
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;CAuDnC,CAAA;AArDC;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,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDAClB;AAGpB;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;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;AAtDb,eAAe;IADnC,gBAAM,EAAE;GACY,eAAe,CAuDnC;kBAvDoB,eAAe"}
|
|
@@ -28,7 +28,7 @@ __decorate([
|
|
|
28
28
|
__decorate([
|
|
29
29
|
typeorm_1.Column('varchar'),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
|
-
], ProductScraping.prototype, "
|
|
31
|
+
], ProductScraping.prototype, "urls", void 0);
|
|
32
32
|
__decorate([
|
|
33
33
|
typeorm_1.Column('varchar'),
|
|
34
34
|
__metadata("design:type", String)
|
|
@@ -37,6 +37,10 @@ __decorate([
|
|
|
37
37
|
typeorm_1.Column('varchar', { length: '21844', nullable: true }),
|
|
38
38
|
__metadata("design:type", String)
|
|
39
39
|
], ProductScraping.prototype, "properties", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
typeorm_1.Column('varchar', { length: '21844', nullable: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ProductScraping.prototype, "scraper", void 0);
|
|
40
44
|
__decorate([
|
|
41
45
|
typeorm_1.ManyToOne(() => User_1.default, { eager: true }),
|
|
42
46
|
typeorm_1.JoinColumn(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductScraping.js","sourceRoot":"","sources":["../../src/entity/ProductScraping.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,kDAA0B;AAC1B,kEAA0C;AAG1C,IAAqB,eAAe,GAApC,MAAqB,eAAgB,SAAQ,sBAAY;
|
|
1
|
+
{"version":3,"file":"ProductScraping.js","sourceRoot":"","sources":["../../src/entity/ProductScraping.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAOiB;AACjB,kDAA0B;AAC1B,kEAA0C;AAG1C,IAAqB,eAAe,GAApC,MAAqB,eAAgB,SAAQ,sBAAY;CAsBxD,CAAA;AApBC;IADC,gCAAsB,EAAE;;2CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;kDAAC;AAGhB;IADC,gBAAM,CAAC,SAAS,CAAC;;6CACL;AAGb;IADC,gBAAM,CAAC,SAAS,CAAC;;+CACH;AAGf;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mDACpC;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACvC;AAIhB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACtC,oBAAU,EAAE;8BACP,cAAI;6CAAC;AArBQ,eAAe;IADnC,gBAAM,EAAE;GACY,eAAe,CAsBnC;kBAtBoB,eAAe"}
|
|
@@ -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.productScraping1714443774788 = void 0;
|
|
13
|
+
class productScraping1714443774788 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'productScraping1714443774788';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE \`product_scraping\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`url\` varchar(255) NOT NULL, \`status\` varchar(255) NOT NULL, \`properties\` varchar(21844) NULL, \`user_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`product\` ADD \`origin_url\` varchar(255) NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`product_scraping\` ADD CONSTRAINT \`FK_e8c2061ff40e510e6fb8e89a184\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
down(queryRunner) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`product_scraping\` DROP FOREIGN KEY \`FK_e8c2061ff40e510e6fb8e89a184\``);
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`product\` DROP COLUMN \`origin_url\``);
|
|
28
|
+
yield queryRunner.query(`DROP TABLE \`product_scraping\``);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.productScraping1714443774788 = productScraping1714443774788;
|
|
33
|
+
//# sourceMappingURL=1714443774788-product_scraping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1714443774788-product_scraping.js","sourceRoot":"","sources":["../../src/migrations/1714443774788-product_scraping.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,4BAA4B;IAAzC;QACI,SAAI,GAAG,8BAA8B,CAAA;IAczC,CAAC;IAZgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,2aAA2a,CAAC,CAAC;YACrc,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;YACxF,MAAM,WAAW,CAAC,KAAK,CAAC,kLAAkL,CAAC,CAAC;QAChN,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,sFAAsF,CAAC,CAAC;YAChH,MAAM,WAAW,CAAC,KAAK,CAAC,oDAAoD,CAAC,CAAC;YAC9E,MAAM,WAAW,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;QAC/D,CAAC;KAAA;CAEJ;AAfD,oEAeC"}
|
|
@@ -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.productScrapingV11714738807306 = void 0;
|
|
13
|
+
class productScrapingV11714738807306 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'productScrapingV11714738807306';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`product_scraping\` DROP COLUMN \`url\``);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`product_scraping\` ADD \`urls\` varchar(255) NOT NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`product_scraping\` ADD \`scraper\` varchar(21844) NULL`);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
down(queryRunner) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
yield queryRunner.query(`ALTER TABLE \`product_scraping\` DROP COLUMN \`scraper\``);
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`product_scraping\` DROP COLUMN \`urls\``);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`product_scraping\` ADD \`url\` varchar(255) NOT NULL`);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.productScrapingV11714738807306 = productScrapingV11714738807306;
|
|
33
|
+
//# sourceMappingURL=1714738807306-product_scraping_v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1714738807306-product_scraping_v1.js","sourceRoot":"","sources":["../../src/migrations/1714738807306-product_scraping_v1.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,8BAA8B;IAA3C;QACI,SAAI,GAAG,gCAAgC,CAAA;IAc3C,CAAC;IAZgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;YAChF,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;QACpG,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;YACpF,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;YACjF,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;QAClG,CAAC;KAAA;CAEJ;AAfD,wEAeC"}
|
|
@@ -2442,8 +2442,8 @@
|
|
|
2442
2442
|
"affectsGlobalScope": false
|
|
2443
2443
|
},
|
|
2444
2444
|
"../src/entity/importedproduct.ts": {
|
|
2445
|
-
"version": "
|
|
2446
|
-
"signature": "
|
|
2445
|
+
"version": "2c224445e2804ceaa19e669fb83387868b4448c08f6eaa9b562bab0448a29558",
|
|
2446
|
+
"signature": "0c925318b052d3942baae7ea6ed3bd72ed512efb81fac4ecb3032c93d01d2cd7",
|
|
2447
2447
|
"affectsGlobalScope": false
|
|
2448
2448
|
},
|
|
2449
2449
|
"../src/staticdata/currency.ts": {
|
|
@@ -2797,8 +2797,8 @@
|
|
|
2797
2797
|
"affectsGlobalScope": false
|
|
2798
2798
|
},
|
|
2799
2799
|
"../src/entity/productscraping.ts": {
|
|
2800
|
-
"version": "
|
|
2801
|
-
"signature": "
|
|
2800
|
+
"version": "99f4a1ac5703af82798097d2bbe5fc8e48ef86795d20eb89a8bf74e6413b972d",
|
|
2801
|
+
"signature": "a74ca82c5eda95c66ac02acdfde265581be12d96723d167e315518d8c76df6ac",
|
|
2802
2802
|
"affectsGlobalScope": false
|
|
2803
2803
|
},
|
|
2804
2804
|
"../src/entity/index.ts": {
|
|
@@ -3776,6 +3776,16 @@
|
|
|
3776
3776
|
"signature": "c433b31f1ee5b88a418ea3c3e5ca6bc91c99027c13f8c2c5407acd0159357d9c",
|
|
3777
3777
|
"affectsGlobalScope": false
|
|
3778
3778
|
},
|
|
3779
|
+
"../src/migrations/1714443774788-product_scraping.ts": {
|
|
3780
|
+
"version": "a2f05c46e6e107461dd66963417c341ef93e884d971366d0d9f3d089fc91f10a",
|
|
3781
|
+
"signature": "1e846637f4ec9fefa58c3206b0469c64235194c563e3feb852cc49f2499ce9e5",
|
|
3782
|
+
"affectsGlobalScope": false
|
|
3783
|
+
},
|
|
3784
|
+
"../src/migrations/1714738807306-product_scraping_v1.ts": {
|
|
3785
|
+
"version": "5486326009923173cf08a70ba4963eb9b9eeebffc29131bd37598a57c92ea1b3",
|
|
3786
|
+
"signature": "53f75ea1ef2173cdfac34107fa023846615e40a96da15070575b9538e764e71f",
|
|
3787
|
+
"affectsGlobalScope": false
|
|
3788
|
+
},
|
|
3779
3789
|
"../src/migrations/execute/index.ts": {
|
|
3780
3790
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3781
3791
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -6963,6 +6973,12 @@
|
|
|
6963
6973
|
"../src/migrations/1714169905823-cart-channel-user.ts": [
|
|
6964
6974
|
"../node_modules/typeorm/index.d.ts"
|
|
6965
6975
|
],
|
|
6976
|
+
"../src/migrations/1714443774788-product_scraping.ts": [
|
|
6977
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6978
|
+
],
|
|
6979
|
+
"../src/migrations/1714738807306-product_scraping_v1.ts": [
|
|
6980
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6981
|
+
],
|
|
6966
6982
|
"../src/migrations/execute/index.ts": [
|
|
6967
6983
|
"../src/config/connect.ts"
|
|
6968
6984
|
],
|
|
@@ -10002,6 +10018,12 @@
|
|
|
10002
10018
|
"../src/migrations/1714169905823-cart-channel-user.ts": [
|
|
10003
10019
|
"../node_modules/typeorm/index.d.ts"
|
|
10004
10020
|
],
|
|
10021
|
+
"../src/migrations/1714443774788-product_scraping.ts": [
|
|
10022
|
+
"../node_modules/typeorm/index.d.ts"
|
|
10023
|
+
],
|
|
10024
|
+
"../src/migrations/1714738807306-product_scraping_v1.ts": [
|
|
10025
|
+
"../node_modules/typeorm/index.d.ts"
|
|
10026
|
+
],
|
|
10005
10027
|
"../src/migrations/index.ts": [
|
|
10006
10028
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
10007
10029
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -10920,6 +10942,8 @@
|
|
|
10920
10942
|
"../src/migrations/1713881510590-checkout-buyer-accepts.ts",
|
|
10921
10943
|
"../src/migrations/1714142019591-order-confirmation-email.ts",
|
|
10922
10944
|
"../src/migrations/1714169905823-cart-channel-user.ts",
|
|
10945
|
+
"../src/migrations/1714443774788-product_scraping.ts",
|
|
10946
|
+
"../src/migrations/1714738807306-product_scraping_v1.ts",
|
|
10923
10947
|
"../src/migrations/execute/index.ts",
|
|
10924
10948
|
"../src/migrations/index.ts",
|
|
10925
10949
|
"../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.177",
|
|
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.177",
|
|
25
|
+
"@reachu/utils": "1.0.177",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -18,7 +18,7 @@ export default class ProductScraping extends AuditedModel {
|
|
|
18
18
|
deletedAt: Date;
|
|
19
19
|
|
|
20
20
|
@Column('varchar')
|
|
21
|
-
|
|
21
|
+
urls: string;
|
|
22
22
|
|
|
23
23
|
@Column('varchar')
|
|
24
24
|
status: string;
|
|
@@ -26,6 +26,9 @@ export default class ProductScraping extends AuditedModel {
|
|
|
26
26
|
@Column('varchar', { length: '21844', nullable: true })
|
|
27
27
|
properties: string;
|
|
28
28
|
|
|
29
|
+
@Column('varchar', { length: '21844', nullable: true })
|
|
30
|
+
scraper: string;
|
|
31
|
+
|
|
29
32
|
@ManyToOne(() => User, { eager: true })
|
|
30
33
|
@JoinColumn()
|
|
31
34
|
user: User;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class productScraping1714443774788 implements MigrationInterface {
|
|
4
|
+
name = 'productScraping1714443774788'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE \`product_scraping\` (\`created_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6), \`updated_at\` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6), \`id\` int NOT NULL AUTO_INCREMENT, \`deleted_at\` datetime(6) NULL, \`url\` varchar(255) NOT NULL, \`status\` varchar(255) NOT NULL, \`properties\` varchar(21844) NULL, \`user_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`product\` ADD \`origin_url\` varchar(255) NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`product_scraping\` ADD CONSTRAINT \`FK_e8c2061ff40e510e6fb8e89a184\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`product_scraping\` DROP FOREIGN KEY \`FK_e8c2061ff40e510e6fb8e89a184\``);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`product\` DROP COLUMN \`origin_url\``);
|
|
15
|
+
await queryRunner.query(`DROP TABLE \`product_scraping\``);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class productScrapingV11714738807306 implements MigrationInterface {
|
|
4
|
+
name = 'productScrapingV11714738807306'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`product_scraping\` DROP COLUMN \`url\``);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`product_scraping\` ADD \`urls\` varchar(255) NOT NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`product_scraping\` ADD \`scraper\` varchar(21844) NULL`);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`product_scraping\` DROP COLUMN \`scraper\``);
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`product_scraping\` DROP COLUMN \`urls\``);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`product_scraping\` ADD \`url\` varchar(255) NOT NULL`);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
}
|