@reachu/database 1.0.100 → 1.0.102

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.
Files changed (34) hide show
  1. package/dist/entity/WooConnection.d.ts +1 -0
  2. package/dist/entity/WooConnection.js +5 -1
  3. package/dist/entity/WooConnection.js.map +1 -1
  4. package/dist/migrations/1691670038774-woo_connect_channel_user_1.d.ts +6 -0
  5. package/dist/migrations/1691670038774-woo_connect_channel_user_1.js +33 -0
  6. package/dist/migrations/1691670038774-woo_connect_channel_user_1.js.map +1 -0
  7. package/dist/migrations/1691670866271-woo_connect_channel_user_3.d.ts +6 -0
  8. package/dist/migrations/1691670866271-woo_connect_channel_user_3.js +35 -0
  9. package/dist/migrations/1691670866271-woo_connect_channel_user_3.js.map +1 -0
  10. package/dist/migrations/1691671305372-woo_connect_channel_user_4.d.ts +6 -0
  11. package/dist/migrations/1691671305372-woo_connect_channel_user_4.js +31 -0
  12. package/dist/migrations/1691671305372-woo_connect_channel_user_4.js.map +1 -0
  13. package/dist/migrations/1691671493692-woo_connect_channel_user_5.d.ts +6 -0
  14. package/dist/migrations/1691671493692-woo_connect_channel_user_5.js +29 -0
  15. package/dist/migrations/1691671493692-woo_connect_channel_user_5.js.map +1 -0
  16. package/dist/migrations/1691679304105-woo_connect_channel_user_6.d.ts +6 -0
  17. package/dist/migrations/1691679304105-woo_connect_channel_user_6.js +31 -0
  18. package/dist/migrations/1691679304105-woo_connect_channel_user_6.js.map +1 -0
  19. package/dist/migrations/1691764260299-promote_to_production_11_08_23.d.ts +6 -0
  20. package/dist/migrations/1691764260299-promote_to_production_11_08_23.js +33 -0
  21. package/dist/migrations/1691764260299-promote_to_production_11_08_23.js.map +1 -0
  22. package/dist/migrations/1693220480521-woo_connect_supplier.d.ts +6 -0
  23. package/dist/migrations/1693220480521-woo_connect_supplier.js +29 -0
  24. package/dist/migrations/1693220480521-woo_connect_supplier.js.map +1 -0
  25. package/dist/tsconfig.tsbuildinfo +86 -2
  26. package/package.json +3 -3
  27. package/src/entity/WooConnection.ts +5 -2
  28. package/src/migrations/1691670038774-woo_connect_channel_user_1.ts +18 -0
  29. package/src/migrations/1691670866271-woo_connect_channel_user_3.ts +20 -0
  30. package/src/migrations/1691671305372-woo_connect_channel_user_4.ts +16 -0
  31. package/src/migrations/1691671493692-woo_connect_channel_user_5.ts +14 -0
  32. package/src/migrations/1691679304105-woo_connect_channel_user_6.ts +16 -0
  33. package/src/migrations/1691764260299-promote_to_production_11_08_23.ts +18 -0
  34. package/src/migrations/1693220480521-woo_connect_supplier.ts +14 -0
@@ -5,5 +5,6 @@ export default class WooConnection {
5
5
  consumerKey: string;
6
6
  consumerSecret: string;
7
7
  currency?: string;
8
+ issuplier?: boolean;
8
9
  user: User;
9
10
  }
@@ -37,7 +37,11 @@ __decorate([
37
37
  __metadata("design:type", String)
38
38
  ], WooConnection.prototype, "currency", void 0);
39
39
  __decorate([
40
- typeorm_1.OneToOne(() => User_1.default, (user) => user.woo, { onDelete: 'CASCADE' }),
40
+ typeorm_1.Column('boolean', { nullable: true, default: false }),
41
+ __metadata("design:type", Boolean)
42
+ ], WooConnection.prototype, "issuplier", void 0);
43
+ __decorate([
44
+ typeorm_1.ManyToOne(() => User_1.default, (user) => user.woo, { onDelete: 'CASCADE' }),
41
45
  typeorm_1.JoinColumn(),
42
46
  __metadata("design:type", User_1.default)
43
47
  ], WooConnection.prototype, "user", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"WooConnection.js","sourceRoot":"","sources":["../../src/entity/WooConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAuF;AACvF,kDAA0B;AAG1B,IAAqB,aAAa,GAAlC,MAAqB,aAAa;CAmBjC,CAAA;AAjBC;IADC,gCAAsB,EAAE;;yCACd;AAGX;IADC,gBAAM,CAAC,SAAS,CAAC;;2CACL;AAGb;IADC,gBAAM,CAAC,SAAS,CAAC;;kDACE;AAGpB;IADC,gBAAM,CAAC,SAAS,CAAC;;qDACK;AAGvB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACpB;AAIlB;IAFC,kBAAQ,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IACjE,oBAAU,EAAE;8BACP,cAAI;2CAAC;AAlBQ,aAAa;IADjC,gBAAM,EAAE;GACY,aAAa,CAmBjC;kBAnBoB,aAAa"}
1
+ {"version":3,"file":"WooConnection.js","sourceRoot":"","sources":["../../src/entity/WooConnection.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAwF;AACxF,kDAA0B;AAG1B,IAAqB,aAAa,GAAlC,MAAqB,aAAa;CAsBjC,CAAA;AApBC;IADC,gCAAsB,EAAE;;yCACd;AAGX;IADC,gBAAM,CAAC,SAAS,CAAC;;2CACL;AAGb;IADC,gBAAM,CAAC,SAAS,CAAC;;kDACE;AAGpB;IADC,gBAAM,CAAC,SAAS,CAAC;;qDACK;AAGvB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACpB;AAGlB;IADC,gBAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gDAClC;AAIpB;IAFC,mBAAS,CAAC,GAAG,EAAE,CAAC,cAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAClE,oBAAU,EAAE;8BACP,cAAI;2CAAC;AArBQ,aAAa;IADjC,gBAAM,EAAE;GACY,aAAa,CAsBjC;kBAtBoB,aAAa"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class wooConnectChannelUser11691670038774 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -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.wooConnectChannelUser11691670038774 = void 0;
13
+ class wooConnectChannelUser11691670038774 {
14
+ constructor() {
15
+ this.name = 'wooConnectChannelUser11691670038774';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
20
+ yield queryRunner.query(`DROP INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\``);
21
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` DROP COLUMN \`user_id\``);
22
+ });
23
+ }
24
+ down(queryRunner) {
25
+ return __awaiter(this, void 0, void 0, function* () {
26
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD \`user_id\` int NULL`);
27
+ yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\` (\`user_id\`)`);
28
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
29
+ });
30
+ }
31
+ }
32
+ exports.wooConnectChannelUser11691670038774 = wooConnectChannelUser11691670038774;
33
+ //# sourceMappingURL=1691670038774-woo_connect_channel_user_1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1691670038774-woo_connect_channel_user_1.js","sourceRoot":"","sources":["../../src/migrations/1691670038774-woo_connect_channel_user_1.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,mCAAmC;IAAhD;QACI,SAAI,GAAG,qCAAqC,CAAA;IAchD,CAAC;IAZgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;YAC9G,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QACtF,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;YACnF,MAAM,WAAW,CAAC,KAAK,CAAC,4FAA4F,CAAC,CAAC;YACtH,MAAM,WAAW,CAAC,KAAK,CAAC,8KAA8K,CAAC,CAAC;QAC5M,CAAC;KAAA;CAEJ;AAfD,kFAeC"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class wooConnectChannelUser31691670866271 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -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.wooConnectChannelUser31691670866271 = void 0;
13
+ class wooConnectChannelUser31691670866271 {
14
+ constructor() {
15
+ this.name = 'wooConnectChannelUser31691670866271';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD \`user_id\` int NULL`);
20
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD UNIQUE INDEX \`IDX_c61b68995acf5a1a32f2c60175\` (\`user_id\`)`);
21
+ yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\` (\`user_id\`)`);
22
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
23
+ });
24
+ }
25
+ down(queryRunner) {
26
+ return __awaiter(this, void 0, void 0, function* () {
27
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
28
+ yield queryRunner.query(`DROP INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\``);
29
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` DROP INDEX \`IDX_c61b68995acf5a1a32f2c60175\``);
30
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` DROP COLUMN \`user_id\``);
31
+ });
32
+ }
33
+ }
34
+ exports.wooConnectChannelUser31691670866271 = wooConnectChannelUser31691670866271;
35
+ //# sourceMappingURL=1691670866271-woo_connect_channel_user_3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1691670866271-woo_connect_channel_user_3.js","sourceRoot":"","sources":["../../src/migrations/1691670866271-woo_connect_channel_user_3.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,mCAAmC;IAAhD;QACI,SAAI,GAAG,qCAAqC,CAAA;IAgBhD,CAAC;IAdgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;YACnF,MAAM,WAAW,CAAC,KAAK,CAAC,kGAAkG,CAAC,CAAC;YAC5H,MAAM,WAAW,CAAC,KAAK,CAAC,4FAA4F,CAAC,CAAC;YACtH,MAAM,WAAW,CAAC,KAAK,CAAC,8KAA8K,CAAC,CAAC;QAC5M,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;YAC9G,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,8EAA8E,CAAC,CAAC;YACxG,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QACtF,CAAC;KAAA;CAEJ;AAjBD,kFAiBC"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class wooConnectChannelUser41691671305372 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.wooConnectChannelUser41691671305372 = void 0;
13
+ class wooConnectChannelUser41691671305372 {
14
+ constructor() {
15
+ this.name = 'wooConnectChannelUser41691671305372';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`DROP INDEX \`IDX_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\``);
20
+ yield queryRunner.query(`DROP INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\``);
21
+ });
22
+ }
23
+ down(queryRunner) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ yield queryRunner.query(`CREATE UNIQUE INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\` (\`user_id\`)`);
26
+ yield queryRunner.query(`CREATE UNIQUE INDEX \`IDX_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\` (\`user_id\`)`);
27
+ });
28
+ }
29
+ }
30
+ exports.wooConnectChannelUser41691671305372 = wooConnectChannelUser41691671305372;
31
+ //# sourceMappingURL=1691671305372-woo_connect_channel_user_4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1691671305372-woo_connect_channel_user_4.js","sourceRoot":"","sources":["../../src/migrations/1691671305372-woo_connect_channel_user_4.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,mCAAmC;IAAhD;QACI,SAAI,GAAG,qCAAqC,CAAA;IAYhD,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;QACnG,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,4FAA4F,CAAC,CAAC;YACtH,MAAM,WAAW,CAAC,KAAK,CAAC,4FAA4F,CAAC,CAAC;QAC1H,CAAC;KAAA;CAEJ;AAbD,kFAaC"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class wooConnectChannelUser51691671493692 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -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.wooConnectChannelUser51691671493692 = void 0;
13
+ class wooConnectChannelUser51691671493692 {
14
+ constructor() {
15
+ this.name = 'wooConnectChannelUser51691671493692';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`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 \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
25
+ });
26
+ }
27
+ }
28
+ exports.wooConnectChannelUser51691671493692 = wooConnectChannelUser51691671493692;
29
+ //# sourceMappingURL=1691671493692-woo_connect_channel_user_5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1691671493692-woo_connect_channel_user_5.js","sourceRoot":"","sources":["../../src/migrations/1691671493692-woo_connect_channel_user_5.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,mCAAmC;IAAhD;QACI,SAAI,GAAG,qCAAqC,CAAA;IAUhD,CAAC;IARgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,8KAA8K,CAAC,CAAC;QAC5M,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;QAClH,CAAC;KAAA;CAEJ;AAXD,kFAWC"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class wooConnectChannelUser61691679304105 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.wooConnectChannelUser61691679304105 = void 0;
13
+ class wooConnectChannelUser61691679304105 {
14
+ constructor() {
15
+ this.name = 'wooConnectChannelUser61691679304105';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD \`user_id\` int NULL`);
20
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
21
+ });
22
+ }
23
+ down(queryRunner) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
26
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` DROP COLUMN \`user_id\``);
27
+ });
28
+ }
29
+ }
30
+ exports.wooConnectChannelUser61691679304105 = wooConnectChannelUser61691679304105;
31
+ //# sourceMappingURL=1691679304105-woo_connect_channel_user_6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1691679304105-woo_connect_channel_user_6.js","sourceRoot":"","sources":["../../src/migrations/1691679304105-woo_connect_channel_user_6.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,mCAAmC;IAAhD;QACI,SAAI,GAAG,qCAAqC,CAAA;IAYhD,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;YACnF,MAAM,WAAW,CAAC,KAAK,CAAC,8KAA8K,CAAC,CAAC;QAC5M,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;YAC9G,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QACtF,CAAC;KAAA;CAEJ;AAbD,kFAaC"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class promoteToProduction1108231691764260299 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -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.promoteToProduction1108231691764260299 = void 0;
13
+ class promoteToProduction1108231691764260299 {
14
+ constructor() {
15
+ this.name = 'promoteToProduction1108231691764260299';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`woo_connection_id\` int NULL`);
20
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
21
+ yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_fff56e95cc26550a1c6ae8f1863\` FOREIGN KEY (\`woo_connection_id\`) REFERENCES \`woo_connection\`(\`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 \`channel_user\` DROP FOREIGN KEY \`FK_fff56e95cc26550a1c6ae8f1863\``);
27
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
28
+ yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`woo_connection_id\``);
29
+ });
30
+ }
31
+ }
32
+ exports.promoteToProduction1108231691764260299 = promoteToProduction1108231691764260299;
33
+ //# sourceMappingURL=1691764260299-promote_to_production_11_08_23.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1691764260299-promote_to_production_11_08_23.js","sourceRoot":"","sources":["../../src/migrations/1691764260299-promote_to_production_11_08_23.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,sCAAsC;IAAnD;QACI,SAAI,GAAG,wCAAwC,CAAA;IAcnD,CAAC;IAZgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;YAC3F,MAAM,WAAW,CAAC,KAAK,CAAC,8KAA8K,CAAC,CAAC;YACxM,MAAM,WAAW,CAAC,KAAK,CAAC,kMAAkM,CAAC,CAAC;QAChO,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;YAC5G,MAAM,WAAW,CAAC,KAAK,CAAC,oFAAoF,CAAC,CAAC;YAC9G,MAAM,WAAW,CAAC,KAAK,CAAC,gEAAgE,CAAC,CAAC;QAC9F,CAAC;KAAA;CAEJ;AAfD,wFAeC"}
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class wooConnectSupplier1693220480521 implements MigrationInterface {
3
+ name: string;
4
+ up(queryRunner: QueryRunner): Promise<void>;
5
+ down(queryRunner: QueryRunner): Promise<void>;
6
+ }
@@ -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.wooConnectSupplier1693220480521 = void 0;
13
+ class wooConnectSupplier1693220480521 {
14
+ constructor() {
15
+ this.name = 'wooConnectSupplier1693220480521';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` ADD \`issuplier\` tinyint NULL DEFAULT 0`);
20
+ });
21
+ }
22
+ down(queryRunner) {
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ yield queryRunner.query(`ALTER TABLE \`woo_connection\` DROP COLUMN \`issuplier\``);
25
+ });
26
+ }
27
+ }
28
+ exports.wooConnectSupplier1693220480521 = wooConnectSupplier1693220480521;
29
+ //# sourceMappingURL=1693220480521-woo_connect_supplier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1693220480521-woo_connect_supplier.js","sourceRoot":"","sources":["../../src/migrations/1693220480521-woo_connect_supplier.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,+BAA+B;IAA5C;QACI,SAAI,GAAG,iCAAiC,CAAA;IAU5C,CAAC;IARgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;QACvG,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QACxF,CAAC;KAAA;CAEJ;AAXD,0EAWC"}
@@ -1962,8 +1962,8 @@
1962
1962
  "affectsGlobalScope": false
1963
1963
  },
1964
1964
  "../src/entity/wooconnection.ts": {
1965
- "version": "30c55998866fc1d16037696e2a360b679789a7ed0072a50b9d2ac58d24b1f3a1",
1966
- "signature": "325f170f1bf4b774a97b7a92456965ff07cd6d5d6166364bca39ae7946ada940",
1965
+ "version": "5ca21dc11f40a474eb376be2b884fb211819ec5dffec5ea7a99b280965af1cb8",
1966
+ "signature": "49d6905bbefd95b0be1cbe7bf5b603567da9eb45a122309dd19d57b9b61bf98a",
1967
1967
  "affectsGlobalScope": false
1968
1968
  },
1969
1969
  "../src/entity/businessproducts.ts": {
@@ -3436,6 +3436,41 @@
3436
3436
  "signature": "214ed76806fee8b9b57628e9813e1e7f8d7733c500803838c210a268409f2fb9",
3437
3437
  "affectsGlobalScope": false
3438
3438
  },
3439
+ "../src/migrations/1691670038774-woo_connect_channel_user_1.ts": {
3440
+ "version": "bd394240ca3e2780d597b9e71272193ced4c26c464ff8191d23eb19bff9c9477",
3441
+ "signature": "57d196d9f815dbbb4700e01e0f0a8341e302372e06d2ad3a46a4d382119da417",
3442
+ "affectsGlobalScope": false
3443
+ },
3444
+ "../src/migrations/1691670866271-woo_connect_channel_user_3.ts": {
3445
+ "version": "f33d9a21d05b2774090e9d6a4bd0e82059d084c748e7de4f290e795f131688da",
3446
+ "signature": "3c7f1bc41f04054e4b75451e9fb405a28ca4f26a3a0d6a109309eb7b2e9e1958",
3447
+ "affectsGlobalScope": false
3448
+ },
3449
+ "../src/migrations/1691671305372-woo_connect_channel_user_4.ts": {
3450
+ "version": "57e6c0fac78d890c3cb0857d39c9eb765172d49e8c1e926b8c44e4af15604158",
3451
+ "signature": "37c7a95be3934e58bd5b44a251d122a7846c182da51f78c839123bb8596ac345",
3452
+ "affectsGlobalScope": false
3453
+ },
3454
+ "../src/migrations/1691671493692-woo_connect_channel_user_5.ts": {
3455
+ "version": "c2583ea0c1e997dbd6d7625f31c15dc8fd8825985d6538c3a6d0aeced73221ea",
3456
+ "signature": "de30be4f375b6d499768780cd8aaa81b4ffda1e31484cd41194d74a942f50ced",
3457
+ "affectsGlobalScope": false
3458
+ },
3459
+ "../src/migrations/1691679304105-woo_connect_channel_user_6.ts": {
3460
+ "version": "be50bc729defdb8a7adba4d867e8fbf8f2fc2d5280319fb59acd5a7449852c97",
3461
+ "signature": "86ef9ddab9ac6f8f51713b2468d0f5cdbc067768ff214c4294731715b5e797f4",
3462
+ "affectsGlobalScope": false
3463
+ },
3464
+ "../src/migrations/1691764260299-promote_to_production_11_08_23.ts": {
3465
+ "version": "c83af810f202930f2391b55df1e8f1d1b7fb33d59521fa9d0c69bfaef723c6df",
3466
+ "signature": "852f21f4671e0a81bcd2542867340e2d7f7eec94cc18a680f69268a4bfe8483a",
3467
+ "affectsGlobalScope": false
3468
+ },
3469
+ "../src/migrations/1693220480521-woo_connect_supplier.ts": {
3470
+ "version": "7067771c20428f6bb150d1ef22ec0566398eac8359090b41d3bfd8fe873a055b",
3471
+ "signature": "ab17663b796634970b2de27429f1e7125dca730e19e608d5739f00f6b2481624",
3472
+ "affectsGlobalScope": false
3473
+ },
3439
3474
  "../src/migrations/execute/index.ts": {
3440
3475
  "version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
3441
3476
  "signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
@@ -6387,6 +6422,27 @@
6387
6422
  "../src/migrations/1691662129283-woo_connect_channel_user.ts": [
6388
6423
  "../node_modules/typeorm/index.d.ts"
6389
6424
  ],
6425
+ "../src/migrations/1691670038774-woo_connect_channel_user_1.ts": [
6426
+ "../node_modules/typeorm/index.d.ts"
6427
+ ],
6428
+ "../src/migrations/1691670866271-woo_connect_channel_user_3.ts": [
6429
+ "../node_modules/typeorm/index.d.ts"
6430
+ ],
6431
+ "../src/migrations/1691671305372-woo_connect_channel_user_4.ts": [
6432
+ "../node_modules/typeorm/index.d.ts"
6433
+ ],
6434
+ "../src/migrations/1691671493692-woo_connect_channel_user_5.ts": [
6435
+ "../node_modules/typeorm/index.d.ts"
6436
+ ],
6437
+ "../src/migrations/1691679304105-woo_connect_channel_user_6.ts": [
6438
+ "../node_modules/typeorm/index.d.ts"
6439
+ ],
6440
+ "../src/migrations/1691764260299-promote_to_production_11_08_23.ts": [
6441
+ "../node_modules/typeorm/index.d.ts"
6442
+ ],
6443
+ "../src/migrations/1693220480521-woo_connect_supplier.ts": [
6444
+ "../node_modules/typeorm/index.d.ts"
6445
+ ],
6390
6446
  "../src/migrations/execute/index.ts": [
6391
6447
  "../src/config/connect.ts"
6392
6448
  ],
@@ -9194,6 +9250,27 @@
9194
9250
  "../src/migrations/1691662129283-woo_connect_channel_user.ts": [
9195
9251
  "../node_modules/typeorm/index.d.ts"
9196
9252
  ],
9253
+ "../src/migrations/1691670038774-woo_connect_channel_user_1.ts": [
9254
+ "../node_modules/typeorm/index.d.ts"
9255
+ ],
9256
+ "../src/migrations/1691670866271-woo_connect_channel_user_3.ts": [
9257
+ "../node_modules/typeorm/index.d.ts"
9258
+ ],
9259
+ "../src/migrations/1691671305372-woo_connect_channel_user_4.ts": [
9260
+ "../node_modules/typeorm/index.d.ts"
9261
+ ],
9262
+ "../src/migrations/1691671493692-woo_connect_channel_user_5.ts": [
9263
+ "../node_modules/typeorm/index.d.ts"
9264
+ ],
9265
+ "../src/migrations/1691679304105-woo_connect_channel_user_6.ts": [
9266
+ "../node_modules/typeorm/index.d.ts"
9267
+ ],
9268
+ "../src/migrations/1691764260299-promote_to_production_11_08_23.ts": [
9269
+ "../node_modules/typeorm/index.d.ts"
9270
+ ],
9271
+ "../src/migrations/1693220480521-woo_connect_supplier.ts": [
9272
+ "../node_modules/typeorm/index.d.ts"
9273
+ ],
9197
9274
  "../src/migrations/index.ts": [
9198
9275
  "../src/migrations/1628474597284-initialschema.ts",
9199
9276
  "../src/migrations/1630077596132-removemangopay.ts",
@@ -10037,6 +10114,13 @@
10037
10114
  "../src/migrations/1689702729291-discount-applied.ts",
10038
10115
  "../src/migrations/1689964936496-promote_to_production_21_07_23_01.ts",
10039
10116
  "../src/migrations/1691662129283-woo_connect_channel_user.ts",
10117
+ "../src/migrations/1691670038774-woo_connect_channel_user_1.ts",
10118
+ "../src/migrations/1691670866271-woo_connect_channel_user_3.ts",
10119
+ "../src/migrations/1691671305372-woo_connect_channel_user_4.ts",
10120
+ "../src/migrations/1691671493692-woo_connect_channel_user_5.ts",
10121
+ "../src/migrations/1691679304105-woo_connect_channel_user_6.ts",
10122
+ "../src/migrations/1691764260299-promote_to_production_11_08_23.ts",
10123
+ "../src/migrations/1693220480521-woo_connect_supplier.ts",
10040
10124
  "../src/migrations/execute/index.ts",
10041
10125
  "../src/migrations/index.ts",
10042
10126
  "../src/repositories/discount/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.100",
3
+ "version": "1.0.102",
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.100",
25
- "@reachu/utils": "1.0.100",
24
+ "@reachu/logger": "1.0.102",
25
+ "@reachu/utils": "1.0.102",
26
26
  "dotenv": "8.0.0",
27
27
  "express": "4.17.1",
28
28
  "mysql2": "1.5.2",
@@ -1,4 +1,4 @@
1
- import { Entity, PrimaryGeneratedColumn, Column, JoinColumn, OneToOne } from 'typeorm';
1
+ import { Entity, PrimaryGeneratedColumn, Column, JoinColumn, ManyToOne } from 'typeorm';
2
2
  import User from './User';
3
3
 
4
4
  @Entity()
@@ -18,7 +18,10 @@ export default class WooConnection {
18
18
  @Column('varchar', { nullable: true })
19
19
  currency?: string;
20
20
 
21
- @OneToOne(() => User, (user) => user.woo, { onDelete: 'CASCADE' })
21
+ @Column('boolean', { nullable: true, default: false })
22
+ issuplier?: boolean;
23
+
24
+ @ManyToOne(() => User, (user) => user.woo, { onDelete: 'CASCADE' })
22
25
  @JoinColumn()
23
26
  user: User;
24
27
  }
@@ -0,0 +1,18 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class wooConnectChannelUser11691670038774 implements MigrationInterface {
4
+ name = 'wooConnectChannelUser11691670038774'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
8
+ await queryRunner.query(`DROP INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\``);
9
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP COLUMN \`user_id\``);
10
+ }
11
+
12
+ public async down(queryRunner: QueryRunner): Promise<void> {
13
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD \`user_id\` int NULL`);
14
+ await queryRunner.query(`CREATE UNIQUE INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\` (\`user_id\`)`);
15
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
16
+ }
17
+
18
+ }
@@ -0,0 +1,20 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class wooConnectChannelUser31691670866271 implements MigrationInterface {
4
+ name = 'wooConnectChannelUser31691670866271'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD \`user_id\` int NULL`);
8
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD UNIQUE INDEX \`IDX_c61b68995acf5a1a32f2c60175\` (\`user_id\`)`);
9
+ await queryRunner.query(`CREATE UNIQUE INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\` (\`user_id\`)`);
10
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
11
+ }
12
+
13
+ public async down(queryRunner: QueryRunner): Promise<void> {
14
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
15
+ await queryRunner.query(`DROP INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\``);
16
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP INDEX \`IDX_c61b68995acf5a1a32f2c60175\``);
17
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP COLUMN \`user_id\``);
18
+ }
19
+
20
+ }
@@ -0,0 +1,16 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class wooConnectChannelUser41691671305372 implements MigrationInterface {
4
+ name = 'wooConnectChannelUser41691671305372'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`DROP INDEX \`IDX_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\``);
8
+ await queryRunner.query(`DROP INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\``);
9
+ }
10
+
11
+ public async down(queryRunner: QueryRunner): Promise<void> {
12
+ await queryRunner.query(`CREATE UNIQUE INDEX \`REL_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\` (\`user_id\`)`);
13
+ await queryRunner.query(`CREATE UNIQUE INDEX \`IDX_c61b68995acf5a1a32f2c60175\` ON \`woo_connection\` (\`user_id\`)`);
14
+ }
15
+
16
+ }
@@ -0,0 +1,14 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class wooConnectChannelUser51691671493692 implements MigrationInterface {
4
+ name = 'wooConnectChannelUser51691671493692'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
8
+ }
9
+
10
+ public async down(queryRunner: QueryRunner): Promise<void> {
11
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
12
+ }
13
+
14
+ }
@@ -0,0 +1,16 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class wooConnectChannelUser61691679304105 implements MigrationInterface {
4
+ name = 'wooConnectChannelUser61691679304105'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD \`user_id\` int NULL`);
8
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
9
+ }
10
+
11
+ public async down(queryRunner: QueryRunner): Promise<void> {
12
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
13
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP COLUMN \`user_id\``);
14
+ }
15
+
16
+ }
@@ -0,0 +1,18 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class promoteToProduction1108231691764260299 implements MigrationInterface {
4
+ name = 'promoteToProduction1108231691764260299'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`woo_connection_id\` int NULL`);
8
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD CONSTRAINT \`FK_c61b68995acf5a1a32f2c601759\` FOREIGN KEY (\`user_id\`) REFERENCES \`user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
9
+ await queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_fff56e95cc26550a1c6ae8f1863\` FOREIGN KEY (\`woo_connection_id\`) REFERENCES \`woo_connection\`(\`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 \`channel_user\` DROP FOREIGN KEY \`FK_fff56e95cc26550a1c6ae8f1863\``);
14
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP FOREIGN KEY \`FK_c61b68995acf5a1a32f2c601759\``);
15
+ await queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`woo_connection_id\``);
16
+ }
17
+
18
+ }
@@ -0,0 +1,14 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class wooConnectSupplier1693220480521 implements MigrationInterface {
4
+ name = 'wooConnectSupplier1693220480521'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` ADD \`issuplier\` tinyint NULL DEFAULT 0`);
8
+ }
9
+
10
+ public async down(queryRunner: QueryRunner): Promise<void> {
11
+ await queryRunner.query(`ALTER TABLE \`woo_connection\` DROP COLUMN \`issuplier\``);
12
+ }
13
+
14
+ }