@reachu/database 1.0.194 → 1.0.195
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/migrations/1727710054772-channelUserProducts-v3.d.ts +6 -0
- package/dist/migrations/1727710054772-channelUserProducts-v3.js +29 -0
- package/dist/migrations/1727710054772-channelUserProducts-v3.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +12 -0
- package/package.json +3 -3
- package/src/migrations/1727710054772-channelUserProducts-v3.ts +14 -0
|
@@ -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.channelUserProductsV31727710054772 = void 0;
|
|
13
|
+
class channelUserProductsV31727710054772 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'channelUserProductsV31727710054772';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD CONSTRAINT \`FK_ef37d3e38597aa6352c51ca2d57\` FOREIGN KEY (\`product_id\`) REFERENCES \`product\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
down(queryRunner) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP FOREIGN KEY \`FK_ef37d3e38597aa6352c51ca2d57\``);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.channelUserProductsV31727710054772 = channelUserProductsV31727710054772;
|
|
29
|
+
//# sourceMappingURL=1727710054772-channelUserProducts-v3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1727710054772-channelUserProducts-v3.js","sourceRoot":"","sources":["../../src/migrations/1727710054772-channelUserProducts-v3.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,kCAAkC;IAA/C;QACI,SAAI,GAAG,oCAAoC,CAAA;IAU/C,CAAC;IARgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,2LAA2L,CAAC,CAAC;QACzN,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,2FAA2F,CAAC,CAAC;QACzH,CAAC;KAAA;CAEJ;AAXD,gFAWC"}
|
|
@@ -3821,6 +3821,11 @@
|
|
|
3821
3821
|
"signature": "00f56855cf75c60fc023b38b5ab47f1ae0339d105c32b756df2871a09b85d9ba",
|
|
3822
3822
|
"affectsGlobalScope": false
|
|
3823
3823
|
},
|
|
3824
|
+
"../src/migrations/1727710054772-channeluserproducts-v3.ts": {
|
|
3825
|
+
"version": "1509f402e9b0765758de0a5d41a177a6275d3a4afacaa8c16a60e7226d62cbbf",
|
|
3826
|
+
"signature": "9c439b7658ad95bbff67a5b0bc3394b1fa3a560e401fe8c97137d71d8c2e08ff",
|
|
3827
|
+
"affectsGlobalScope": false
|
|
3828
|
+
},
|
|
3824
3829
|
"../src/migrations/execute/index.ts": {
|
|
3825
3830
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3826
3831
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -7046,6 +7051,9 @@
|
|
|
7046
7051
|
"../src/migrations/1727356029415-channeluserproducts-v2.ts": [
|
|
7047
7052
|
"../node_modules/typeorm/index.d.ts"
|
|
7048
7053
|
],
|
|
7054
|
+
"../src/migrations/1727710054772-channeluserproducts-v3.ts": [
|
|
7055
|
+
"../node_modules/typeorm/index.d.ts"
|
|
7056
|
+
],
|
|
7049
7057
|
"../src/migrations/execute/index.ts": [
|
|
7050
7058
|
"../src/config/connect.ts"
|
|
7051
7059
|
],
|
|
@@ -10118,6 +10126,9 @@
|
|
|
10118
10126
|
"../src/migrations/1727356029415-channeluserproducts-v2.ts": [
|
|
10119
10127
|
"../node_modules/typeorm/index.d.ts"
|
|
10120
10128
|
],
|
|
10129
|
+
"../src/migrations/1727710054772-channeluserproducts-v3.ts": [
|
|
10130
|
+
"../node_modules/typeorm/index.d.ts"
|
|
10131
|
+
],
|
|
10121
10132
|
"../src/migrations/index.ts": [
|
|
10122
10133
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
10123
10134
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -11047,6 +11058,7 @@
|
|
|
11047
11058
|
"../src/migrations/1719530172075-woopricesincludetax.ts",
|
|
11048
11059
|
"../src/migrations/1727281200911-channeluserproducts.ts",
|
|
11049
11060
|
"../src/migrations/1727356029415-channeluserproducts-v2.ts",
|
|
11061
|
+
"../src/migrations/1727710054772-channeluserproducts-v3.ts",
|
|
11050
11062
|
"../src/migrations/execute/index.ts",
|
|
11051
11063
|
"../src/migrations/index.ts",
|
|
11052
11064
|
"../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.195",
|
|
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.195",
|
|
25
|
+
"@reachu/utils": "1.0.195",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class channelUserProductsV31727710054772 implements MigrationInterface {
|
|
4
|
+
name = 'channelUserProductsV31727710054772'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` ADD CONSTRAINT \`FK_ef37d3e38597aa6352c51ca2d57\` FOREIGN KEY (\`product_id\`) REFERENCES \`product\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`channel_user_products\` DROP FOREIGN KEY \`FK_ef37d3e38597aa6352c51ca2d57\``);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|