@reachu/database 1.0.118 → 1.0.120
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/ProductDigital.d.ts +2 -0
- package/dist/entity/ProductDigital.js +15 -2
- package/dist/entity/ProductDigital.js.map +1 -1
- package/dist/migrations/1696260773644-digital_update.d.ts +6 -0
- package/dist/migrations/1696260773644-digital_update.js +39 -0
- package/dist/migrations/1696260773644-digital_update.js.map +1 -0
- package/dist/migrations/1696266360829-digital_update_01.d.ts +6 -0
- package/dist/migrations/1696266360829-digital_update_01.js +35 -0
- package/dist/migrations/1696266360829-digital_update_01.js.map +1 -0
- package/dist/migrations/1696268533737-digital_update_02.d.ts +6 -0
- package/dist/migrations/1696268533737-digital_update_02.js +31 -0
- package/dist/migrations/1696268533737-digital_update_02.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +38 -2
- package/package.json +3 -3
- package/src/entity/ProductDigital.ts +11 -0
- package/src/migrations/1696260773644-digital_update.ts +24 -0
- package/src/migrations/1696266360829-digital_update_01.ts +20 -0
- package/src/migrations/1696268533737-digital_update_02.ts +16 -0
|
@@ -18,6 +18,8 @@ export default class ProductDigital extends AuditedModel {
|
|
|
18
18
|
file_size: number;
|
|
19
19
|
shareable: _shareable | null;
|
|
20
20
|
type: _type | null;
|
|
21
|
+
position: number;
|
|
22
|
+
productDigital: ProductDigital;
|
|
21
23
|
price: Price;
|
|
22
24
|
donwload_limit: number;
|
|
23
25
|
expiration_date: Date;
|
|
@@ -11,6 +11,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
13
|
};
|
|
14
|
+
var ProductDigital_1;
|
|
14
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
16
|
exports._shareable = exports._type = void 0;
|
|
16
17
|
const typeorm_1 = require("typeorm");
|
|
@@ -29,7 +30,7 @@ var _shareable;
|
|
|
29
30
|
_shareable[_shareable["no"] = 2] = "no";
|
|
30
31
|
_shareable[_shareable["useConfig"] = 3] = "useConfig";
|
|
31
32
|
})(_shareable = exports._shareable || (exports._shareable = {}));
|
|
32
|
-
let ProductDigital = class ProductDigital extends AuditedModel_1.default {
|
|
33
|
+
let ProductDigital = ProductDigital_1 = class ProductDigital extends AuditedModel_1.default {
|
|
33
34
|
};
|
|
34
35
|
__decorate([
|
|
35
36
|
typeorm_1.PrimaryGeneratedColumn(),
|
|
@@ -55,6 +56,18 @@ __decorate([
|
|
|
55
56
|
typeorm_1.Column('integer', { nullable: true }),
|
|
56
57
|
__metadata("design:type", Number)
|
|
57
58
|
], ProductDigital.prototype, "type", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
typeorm_1.Column('integer', { nullable: true }),
|
|
61
|
+
__metadata("design:type", Number)
|
|
62
|
+
], ProductDigital.prototype, "position", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
typeorm_1.OneToOne(() => ProductDigital_1, (productDigital) => productDigital.id, {
|
|
65
|
+
eager: false,
|
|
66
|
+
nullable: true,
|
|
67
|
+
}),
|
|
68
|
+
typeorm_1.JoinColumn(),
|
|
69
|
+
__metadata("design:type", ProductDigital)
|
|
70
|
+
], ProductDigital.prototype, "productDigital", void 0);
|
|
58
71
|
__decorate([
|
|
59
72
|
typeorm_1.Column(() => Price_entity_1.Price, { prefix: 'price_' }),
|
|
60
73
|
__metadata("design:type", Price_entity_1.Price)
|
|
@@ -78,7 +91,7 @@ __decorate([
|
|
|
78
91
|
typeorm_1.Column('text', { nullable: false }),
|
|
79
92
|
__metadata("design:type", String)
|
|
80
93
|
], ProductDigital.prototype, "name", void 0);
|
|
81
|
-
ProductDigital = __decorate([
|
|
94
|
+
ProductDigital = ProductDigital_1 = __decorate([
|
|
82
95
|
typeorm_1.Entity()
|
|
83
96
|
], ProductDigital);
|
|
84
97
|
exports.default = ProductDigital;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductDigital.js","sourceRoot":"","sources":["../../src/entity/ProductDigital.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProductDigital.js","sourceRoot":"","sources":["../../src/entity/ProductDigital.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,kEAA0C;AAC1C,qDAA2C;AAC3C,iDAAuC;AAEvC,IAAY,KAIX;AAJD,WAAY,KAAK;IACf,iDAAgB,CAAA;IAChB,qCAAU,CAAA;IACV,iCAAQ,CAAA;AACV,CAAC,EAJW,KAAK,GAAL,aAAK,KAAL,aAAK,QAIhB;AAED,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,yCAAO,CAAA;IACP,uCAAM,CAAA;IACN,qDAAa,CAAA;AACf,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAGD,IAAqB,cAAc,sBAAnC,MAAqB,cAAe,SAAQ,sBAAY;CA8CvD,CAAA;AA5CC;IADC,gCAAsB,EAAE;;0CACd;AAGX;IADC,0BAAgB,EAAE;8BACR,IAAI;iDAAC;AAGhB;IADC,gBAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;gDACnB;AAGjB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACpB;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACT;AAG7B;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACnB;AAGnB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACrB;AAOjB;IALC,kBAAQ,CAAC,GAAG,EAAE,CAAC,gBAAc,EAAE,CAAC,cAA8B,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE;QACrF,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,oBAAU,EAAE;8BACG,cAAc;sDAAC;AAG/B;IADC,gBAAM,CAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;8BACnC,oBAAK;6CAAC;AAGb;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACf;AAGvB;IADC,gBAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BACtB,IAAI;uDAAC;AAMtB;IAJC,mBAAS,CAAC,GAAG,EAAE,CAAC,wBAAO,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,EAAE;QAC1D,KAAK,EAAE,KAAK;KACb,CAAC;IACD,oBAAU,EAAE;8BACJ,wBAAO;+CAAC;AAGjB;IADC,gBAAM,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;4CACvB;AA7CM,cAAc;IADlC,gBAAM,EAAE;GACY,cAAc,CA8ClC;kBA9CoB,cAAc"}
|
|
@@ -0,0 +1,39 @@
|
|
|
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.digitalUpdate1696260773644 = void 0;
|
|
13
|
+
class digitalUpdate1696260773644 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'digitalUpdate1696260773644';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`shareable\` int NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`type\` int NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`price_amount\` decimal(10,2) NULL`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`price_currency_code\` varchar(255) NULL`);
|
|
23
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`price_base_amount\` decimal(10,2) NULL`);
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`price_compare_at\` decimal(10,2) NULL`);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
down(queryRunner) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`price_compare_at\``);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`price_base_amount\``);
|
|
31
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`price_currency_code\``);
|
|
32
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`price_amount\``);
|
|
33
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`type\``);
|
|
34
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`shareable\``);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.digitalUpdate1696260773644 = digitalUpdate1696260773644;
|
|
39
|
+
//# sourceMappingURL=1696260773644-digital_update.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1696260773644-digital_update.js","sourceRoot":"","sources":["../../src/migrations/1696260773644-digital_update.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,0BAA0B;IAAvC;QACI,SAAI,GAAG,4BAA4B,CAAA;IAoBvC,CAAC;IAlBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,4DAA4D,CAAC,CAAC;YACtF,MAAM,WAAW,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAC;YACjF,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YACnG,MAAM,WAAW,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;YACzG,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;YACxG,MAAM,WAAW,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;QAC3G,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;YAC7F,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;YACxF,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;YAChF,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;QACzF,CAAC;KAAA;CAEJ;AArBD,gEAqBC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
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.digitalUpdate011696266360829 = void 0;
|
|
13
|
+
class digitalUpdate011696266360829 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'digitalUpdate011696266360829';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`product_digital_id\` int NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD UNIQUE INDEX \`IDX_c6bbcf34d07fb60f39b9852f2a\` (\`product_digital_id\`)`);
|
|
21
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_c6bbcf34d07fb60f39b9852f2a\` ON \`product_digital\` (\`product_digital_id\`)`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD CONSTRAINT \`FK_c6bbcf34d07fb60f39b9852f2a7\` FOREIGN KEY (\`product_digital_id\`) REFERENCES \`product_digital\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
down(queryRunner) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP FOREIGN KEY \`FK_c6bbcf34d07fb60f39b9852f2a7\``);
|
|
28
|
+
yield queryRunner.query(`DROP INDEX \`REL_c6bbcf34d07fb60f39b9852f2a\` ON \`product_digital\``);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP INDEX \`IDX_c6bbcf34d07fb60f39b9852f2a\``);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`product_digital_id\``);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.digitalUpdate011696266360829 = digitalUpdate011696266360829;
|
|
35
|
+
//# sourceMappingURL=1696266360829-digital_update_01.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1696266360829-digital_update_01.js","sourceRoot":"","sources":["../../src/migrations/1696266360829-digital_update_01.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,4BAA4B;IAAzC;QACI,SAAI,GAAG,8BAA8B,CAAA;IAgBzC,CAAC;IAdgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,8GAA8G,CAAC,CAAC;YACxI,MAAM,WAAW,CAAC,KAAK,CAAC,wGAAwG,CAAC,CAAC;YAClI,MAAM,WAAW,CAAC,KAAK,CAAC,uMAAuM,CAAC,CAAC;QACrO,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,qFAAqF,CAAC,CAAC;YAC/G,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;YAChG,MAAM,WAAW,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;YACzG,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;QAClG,CAAC;KAAA;CAEJ;AAjBD,oEAiBC"}
|
|
@@ -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.digitalUpdate021696268533737 = void 0;
|
|
13
|
+
class digitalUpdate021696268533737 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'digitalUpdate021696268533737';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`DROP INDEX \`IDX_c6bbcf34d07fb60f39b9852f2a\` ON \`product_digital\``);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`position\` int NULL`);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
down(queryRunner) {
|
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`position\``);
|
|
26
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`IDX_c6bbcf34d07fb60f39b9852f2a\` ON \`product_digital\` (\`product_digital_id\`)`);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.digitalUpdate021696268533737 = digitalUpdate021696268533737;
|
|
31
|
+
//# sourceMappingURL=1696268533737-digital_update_02.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1696268533737-digital_update_02.js","sourceRoot":"","sources":["../../src/migrations/1696268533737-digital_update_02.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,4BAA4B;IAAzC;QACI,SAAI,GAAG,8BAA8B,CAAA;IAYzC,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;YAChG,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;QACzF,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;YACpF,MAAM,WAAW,CAAC,KAAK,CAAC,wGAAwG,CAAC,CAAC;QACtI,CAAC;KAAA;CAEJ;AAbD,oEAaC"}
|
|
@@ -2652,8 +2652,8 @@
|
|
|
2652
2652
|
"affectsGlobalScope": false
|
|
2653
2653
|
},
|
|
2654
2654
|
"../src/entity/productdigital.ts": {
|
|
2655
|
-
"version": "
|
|
2656
|
-
"signature": "
|
|
2655
|
+
"version": "a94b04ba80eaf4b01e00f2680d7debc86087e653f1d7629692ab0dabec165279",
|
|
2656
|
+
"signature": "458b3ad0e3b76f8c3c38d40f6109d2302b60912138f9b5e2dccadf9a236c8a72",
|
|
2657
2657
|
"affectsGlobalScope": false
|
|
2658
2658
|
},
|
|
2659
2659
|
"../src/entity/modules/templates/endpointtemplateecommerce.ts": {
|
|
@@ -3536,6 +3536,21 @@
|
|
|
3536
3536
|
"signature": "a44b995de12ecde750895d72b61706ba5c063712ea3d2f505597b008f04b92dc",
|
|
3537
3537
|
"affectsGlobalScope": false
|
|
3538
3538
|
},
|
|
3539
|
+
"../src/migrations/1696260773644-digital_update.ts": {
|
|
3540
|
+
"version": "6404297868af37ec46a3efe1be36495c2da2160e517cc88acdec344cbf0b2fbb",
|
|
3541
|
+
"signature": "cf2e36d8c426105d3bfa35434a87703808127355e0bb8e6cbe3e156790d40f6f",
|
|
3542
|
+
"affectsGlobalScope": false
|
|
3543
|
+
},
|
|
3544
|
+
"../src/migrations/1696266360829-digital_update_01.ts": {
|
|
3545
|
+
"version": "50ba2224d396bb4eac8b43170f15a948d8109d5d1da4db3455542a5358f44357",
|
|
3546
|
+
"signature": "660f9871aa3be94831d2cd273000d246afd1819aa2832359a1daa1be6e03ce15",
|
|
3547
|
+
"affectsGlobalScope": false
|
|
3548
|
+
},
|
|
3549
|
+
"../src/migrations/1696268533737-digital_update_02.ts": {
|
|
3550
|
+
"version": "1d5e303c9a7957c6fb006e1f529dfe565e234e12bea667b8b2d1d10a2dec6bcb",
|
|
3551
|
+
"signature": "c6f82cb47d34f7da93d240fbe9d790acf46fe51ae6c48ea64cc7672b45ad3c13",
|
|
3552
|
+
"affectsGlobalScope": false
|
|
3553
|
+
},
|
|
3539
3554
|
"../src/migrations/execute/index.ts": {
|
|
3540
3555
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3541
3556
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -6559,6 +6574,15 @@
|
|
|
6559
6574
|
"../src/migrations/1695907880854-digital-product-v-2.ts": [
|
|
6560
6575
|
"../node_modules/typeorm/index.d.ts"
|
|
6561
6576
|
],
|
|
6577
|
+
"../src/migrations/1696260773644-digital_update.ts": [
|
|
6578
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6579
|
+
],
|
|
6580
|
+
"../src/migrations/1696266360829-digital_update_01.ts": [
|
|
6581
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6582
|
+
],
|
|
6583
|
+
"../src/migrations/1696268533737-digital_update_02.ts": [
|
|
6584
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6585
|
+
],
|
|
6562
6586
|
"../src/migrations/execute/index.ts": [
|
|
6563
6587
|
"../src/config/connect.ts"
|
|
6564
6588
|
],
|
|
@@ -9437,6 +9461,15 @@
|
|
|
9437
9461
|
"../src/migrations/1695907880854-digital-product-v-2.ts": [
|
|
9438
9462
|
"../node_modules/typeorm/index.d.ts"
|
|
9439
9463
|
],
|
|
9464
|
+
"../src/migrations/1696260773644-digital_update.ts": [
|
|
9465
|
+
"../node_modules/typeorm/index.d.ts"
|
|
9466
|
+
],
|
|
9467
|
+
"../src/migrations/1696266360829-digital_update_01.ts": [
|
|
9468
|
+
"../node_modules/typeorm/index.d.ts"
|
|
9469
|
+
],
|
|
9470
|
+
"../src/migrations/1696268533737-digital_update_02.ts": [
|
|
9471
|
+
"../node_modules/typeorm/index.d.ts"
|
|
9472
|
+
],
|
|
9440
9473
|
"../src/migrations/index.ts": [
|
|
9441
9474
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
9442
9475
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -10302,6 +10335,9 @@
|
|
|
10302
10335
|
"../src/migrations/1695123846329-imported_magento_1.ts",
|
|
10303
10336
|
"../src/migrations/1695658039275-digital-product-v-1.ts",
|
|
10304
10337
|
"../src/migrations/1695907880854-digital-product-v-2.ts",
|
|
10338
|
+
"../src/migrations/1696260773644-digital_update.ts",
|
|
10339
|
+
"../src/migrations/1696266360829-digital_update_01.ts",
|
|
10340
|
+
"../src/migrations/1696268533737-digital_update_02.ts",
|
|
10305
10341
|
"../src/migrations/execute/index.ts",
|
|
10306
10342
|
"../src/migrations/index.ts",
|
|
10307
10343
|
"../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.120",
|
|
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.120",
|
|
25
|
+
"@reachu/utils": "1.0.120",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
ManyToOne,
|
|
6
6
|
JoinColumn,
|
|
7
7
|
Column,
|
|
8
|
+
OneToOne,
|
|
8
9
|
} from 'typeorm';
|
|
9
10
|
import AuditedModel from './AuditedModel';
|
|
10
11
|
import { Product } from './Product.entity';
|
|
@@ -42,6 +43,16 @@ export default class ProductDigital extends AuditedModel {
|
|
|
42
43
|
@Column('integer', { nullable: true })
|
|
43
44
|
type: _type | null;
|
|
44
45
|
|
|
46
|
+
@Column('integer', { nullable: true })
|
|
47
|
+
position: number;
|
|
48
|
+
|
|
49
|
+
@OneToOne(() => ProductDigital, (productDigital: ProductDigital) => productDigital.id, {
|
|
50
|
+
eager: false,
|
|
51
|
+
nullable: true,
|
|
52
|
+
})
|
|
53
|
+
@JoinColumn()
|
|
54
|
+
productDigital: ProductDigital;
|
|
55
|
+
|
|
45
56
|
@Column(() => Price, { prefix: 'price_' })
|
|
46
57
|
price: Price;
|
|
47
58
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class digitalUpdate1696260773644 implements MigrationInterface {
|
|
4
|
+
name = 'digitalUpdate1696260773644'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`shareable\` int NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`type\` int NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`price_amount\` decimal(10,2) NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`price_currency_code\` varchar(255) NULL`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`price_base_amount\` decimal(10,2) NULL`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`price_compare_at\` decimal(10,2) NULL`);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`price_compare_at\``);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`price_base_amount\``);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`price_currency_code\``);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`price_amount\``);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`type\``);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`shareable\``);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class digitalUpdate011696266360829 implements MigrationInterface {
|
|
4
|
+
name = 'digitalUpdate011696266360829'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`product_digital_id\` int NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD UNIQUE INDEX \`IDX_c6bbcf34d07fb60f39b9852f2a\` (\`product_digital_id\`)`);
|
|
9
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`REL_c6bbcf34d07fb60f39b9852f2a\` ON \`product_digital\` (\`product_digital_id\`)`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD CONSTRAINT \`FK_c6bbcf34d07fb60f39b9852f2a7\` FOREIGN KEY (\`product_digital_id\`) REFERENCES \`product_digital\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP FOREIGN KEY \`FK_c6bbcf34d07fb60f39b9852f2a7\``);
|
|
15
|
+
await queryRunner.query(`DROP INDEX \`REL_c6bbcf34d07fb60f39b9852f2a\` ON \`product_digital\``);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP INDEX \`IDX_c6bbcf34d07fb60f39b9852f2a\``);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`product_digital_id\``);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class digitalUpdate021696268533737 implements MigrationInterface {
|
|
4
|
+
name = 'digitalUpdate021696268533737'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`DROP INDEX \`IDX_c6bbcf34d07fb60f39b9852f2a\` ON \`product_digital\``);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` ADD \`position\` int NULL`);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`product_digital\` DROP COLUMN \`position\``);
|
|
13
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`IDX_c6bbcf34d07fb60f39b9852f2a\` ON \`product_digital\` (\`product_digital_id\`)`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
}
|