@reachu/database 1.0.79 → 1.0.80
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/ChannelUser.d.ts +1 -0
- package/dist/entity/ChannelUser.js +4 -0
- package/dist/entity/ChannelUser.js.map +1 -1
- package/dist/migrations/1687235204409-channel_user.d.ts +6 -0
- package/dist/migrations/1687235204409-channel_user.js +29 -0
- package/dist/migrations/1687235204409-channel_user.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +14 -2
- package/package.json +3 -3
- package/src/entity/ChannelUser.ts +4 -0
- package/src/migrations/1687235204409-channel_user.ts +14 -0
|
@@ -28,6 +28,10 @@ __decorate([
|
|
|
28
28
|
typeorm_1.PrimaryGeneratedColumn(),
|
|
29
29
|
__metadata("design:type", Number)
|
|
30
30
|
], ChannelUser.prototype, "id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], ChannelUser.prototype, "customName", void 0);
|
|
31
35
|
__decorate([
|
|
32
36
|
typeorm_1.ManyToOne(() => User_1.default, (user) => user.id, { onDelete: 'CASCADE' }),
|
|
33
37
|
typeorm_1.JoinColumn(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelUser.js","sourceRoot":"","sources":["../../src/entity/ChannelUser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"ChannelUser.js","sourceRoot":"","sources":["../../src/entity/ChannelUser.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAQiB;AACjB,kEAA0C;AAC1C,wDAAgC;AAChC,kEAA0C;AAC1C,sFAA8D;AAC9D,kDAA0B;AAG1B,IAAqB,WAAW,GAAhC,MAAqB,WAAY,SAAQ,sBAAY;CAiCpD,CAAA;AA/BC;IADC,0BAAgB,EAAE;8BACR,IAAI;8CAAC;AAGhB;IADC,gCAAsB,EAAE;;uCACd;AAGX;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACnB;AAInB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACjE,oBAAU,EAAE;8BACP,cAAI;yCAAC;AAIX;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,iBAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACnF,oBAAU,EAAE;8BACJ,iBAAO;4CAAC;AAMjB;IAJC,mBAAS,CAAC,GAAG,EAAE,CAAC,sBAAY,EAAE,CAAC,YAA0B,EAAE,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE;QACvF,OAAO,EAAE,IAAI;KACd,CAAC;IACD,oBAAU,EAAE;;iDACgB;AAU7B;IARC,mBAAS,CACR,GAAG,EAAE,CAAC,gCAAsB,EAC5B,CAAC,sBAA8C,EAAE,EAAE,CAAC,sBAAsB,CAAC,WAAW,EACtF;QACE,OAAO,EAAE,IAAI;KACd,CACF;IACA,oBAAU,EAAE;;2DACoC;AAhC9B,WAAW;IAD/B,gBAAM,EAAE;GACY,WAAW,CAiC/B;kBAjCoB,WAAW"}
|
|
@@ -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.channelUser1687235204409 = void 0;
|
|
13
|
+
class channelUser1687235204409 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'channelUser1687235204409';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`custom_name\` varchar(255) NULL`);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
down(queryRunner) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`custom_name\``);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.channelUser1687235204409 = channelUser1687235204409;
|
|
29
|
+
//# sourceMappingURL=1687235204409-channel_user.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687235204409-channel_user.js","sourceRoot":"","sources":["../../src/migrations/1687235204409-channel_user.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,wBAAwB;IAArC;QACI,SAAI,GAAG,0BAA0B,CAAA;IAUrC,CAAC;IARgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,oEAAoE,CAAC,CAAC;QAClG,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QACxF,CAAC;KAAA;CAEJ;AAXD,4DAWC"}
|
|
@@ -2467,8 +2467,8 @@
|
|
|
2467
2467
|
"affectsGlobalScope": false
|
|
2468
2468
|
},
|
|
2469
2469
|
"../src/entity/channeluser.ts": {
|
|
2470
|
-
"version": "
|
|
2471
|
-
"signature": "
|
|
2470
|
+
"version": "551ba8056076858d243ea7e3d0b07d608673ffb10b505f0d8654302fad910922",
|
|
2471
|
+
"signature": "a5d05895a0a0d43e4e147857a7b95903e304c701b27495fa0d1f29839f4c8784",
|
|
2472
2472
|
"affectsGlobalScope": false
|
|
2473
2473
|
},
|
|
2474
2474
|
"../src/entity/userchannelapikey.ts": {
|
|
@@ -3296,6 +3296,11 @@
|
|
|
3296
3296
|
"signature": "5b52ac63ec6fdb68511463c2cc3785ea6c3bd4a54540433d0416e87b9c7cdc21",
|
|
3297
3297
|
"affectsGlobalScope": false
|
|
3298
3298
|
},
|
|
3299
|
+
"../src/migrations/1687235204409-channel_user.ts": {
|
|
3300
|
+
"version": "e01eef20dff04a2454047c275bc0e81e1b653373b44bab82b25762b6e5bb2313",
|
|
3301
|
+
"signature": "5c4b5981535ccf6b437a011756006f5734f76f9abbb7b25e622537653a6f45b2",
|
|
3302
|
+
"affectsGlobalScope": false
|
|
3303
|
+
},
|
|
3299
3304
|
"../src/migrations/execute/index.ts": {
|
|
3300
3305
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3301
3306
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -6140,6 +6145,9 @@
|
|
|
6140
6145
|
"../src/migrations/1686837392110-cart_shipping_default.ts": [
|
|
6141
6146
|
"../node_modules/typeorm/index.d.ts"
|
|
6142
6147
|
],
|
|
6148
|
+
"../src/migrations/1687235204409-channel_user.ts": [
|
|
6149
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6150
|
+
],
|
|
6143
6151
|
"../src/migrations/execute/index.ts": [
|
|
6144
6152
|
"../src/config/connect.ts"
|
|
6145
6153
|
],
|
|
@@ -8839,6 +8847,9 @@
|
|
|
8839
8847
|
"../src/migrations/1686837392110-cart_shipping_default.ts": [
|
|
8840
8848
|
"../node_modules/typeorm/index.d.ts"
|
|
8841
8849
|
],
|
|
8850
|
+
"../src/migrations/1687235204409-channel_user.ts": [
|
|
8851
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8852
|
+
],
|
|
8842
8853
|
"../src/migrations/index.ts": [
|
|
8843
8854
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8844
8855
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9646,6 +9657,7 @@
|
|
|
9646
9657
|
"../src/migrations/1686235086187-fix-multiple-shops.ts",
|
|
9647
9658
|
"../src/migrations/1686309865248-cart_shipping_country.ts",
|
|
9648
9659
|
"../src/migrations/1686837392110-cart_shipping_default.ts",
|
|
9660
|
+
"../src/migrations/1687235204409-channel_user.ts",
|
|
9649
9661
|
"../src/migrations/execute/index.ts",
|
|
9650
9662
|
"../src/migrations/index.ts",
|
|
9651
9663
|
"../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.80",
|
|
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.80",
|
|
25
|
+
"@reachu/utils": "1.0.80",
|
|
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
|
OneToMany,
|
|
8
|
+
Column,
|
|
8
9
|
} from 'typeorm';
|
|
9
10
|
import AuditedModel from './AuditedModel';
|
|
10
11
|
import Channel from './Channel';
|
|
@@ -20,6 +21,9 @@ export default class ChannelUser extends AuditedModel {
|
|
|
20
21
|
@PrimaryGeneratedColumn()
|
|
21
22
|
id: number;
|
|
22
23
|
|
|
24
|
+
@Column('varchar', { nullable: true })
|
|
25
|
+
customName: string;
|
|
26
|
+
|
|
23
27
|
@ManyToOne(() => User, (user) => user.id, { onDelete: 'CASCADE' })
|
|
24
28
|
@JoinColumn()
|
|
25
29
|
user: User;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class channelUser1687235204409 implements MigrationInterface {
|
|
4
|
+
name = 'channelUser1687235204409'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`custom_name\` varchar(255) NULL`);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`custom_name\``);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
}
|