@reachu/database 1.0.129 → 1.0.130
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/1699601410949-promote_to_PRODUCTION_10_11_2023.d.ts +6 -0
- package/dist/migrations/1699601410949-promote_to_PRODUCTION_10_11_2023.js +41 -0
- package/dist/migrations/1699601410949-promote_to_PRODUCTION_10_11_2023.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +12 -0
- package/package.json +3 -3
- package/src/migrations/1699601410949-promote_to_PRODUCTION_10_11_2023.ts +26 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class promoteToPRODUCTION101120231699601410949 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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.promoteToPRODUCTION101120231699601410949 = void 0;
|
|
13
|
+
class promoteToPRODUCTION101120231699601410949 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'promoteToPRODUCTION101120231699601410949';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE \`channel_group\` (\`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), \`deleted_at\` datetime(6) NULL, \`id\` int NOT NULL AUTO_INCREMENT, \`channel_user_id\` int NULL, \`product_id\` int NULL, \`variant_id\` int NULL, \`collection_id\` varchar(10) NULL, \`collection_shared_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`use_messaging_queue\` tinyint NULL DEFAULT 1`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_cdf9edf073c9e94025289a1d19b\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_45950478a423fdc46b17aca77c1\` FOREIGN KEY (\`product_id\`) REFERENCES \`product\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
23
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_7ad32bbee5d7964429d47cacd0a\` FOREIGN KEY (\`variant_id\`) REFERENCES \`variant\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_8fcd2dd06554030ebeaedb6336b\` FOREIGN KEY (\`collection_id\`) REFERENCES \`collection\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
25
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_5551f4b45bb31950e8410204a57\` FOREIGN KEY (\`collection_shared_id\`) REFERENCES \`collection_shared\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
down(queryRunner) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_5551f4b45bb31950e8410204a57\``);
|
|
31
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_8fcd2dd06554030ebeaedb6336b\``);
|
|
32
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_7ad32bbee5d7964429d47cacd0a\``);
|
|
33
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_45950478a423fdc46b17aca77c1\``);
|
|
34
|
+
yield queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_cdf9edf073c9e94025289a1d19b\``);
|
|
35
|
+
yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`use_messaging_queue\``);
|
|
36
|
+
yield queryRunner.query(`DROP TABLE \`channel_group\``);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.promoteToPRODUCTION101120231699601410949 = promoteToPRODUCTION101120231699601410949;
|
|
41
|
+
//# sourceMappingURL=1699601410949-promote_to_PRODUCTION_10_11_2023.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1699601410949-promote_to_PRODUCTION_10_11_2023.js","sourceRoot":"","sources":["../../src/migrations/1699601410949-promote_to_PRODUCTION_10_11_2023.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,wCAAwC;IAArD;QACI,SAAI,GAAG,0CAA0C,CAAA;IAsBrD,CAAC;IApBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,ocAAoc,CAAC,CAAC;YAC9d,MAAM,WAAW,CAAC,KAAK,CAAC,iFAAiF,CAAC,CAAC;YAC3G,MAAM,WAAW,CAAC,KAAK,CAAC,6LAA6L,CAAC,CAAC;YACvN,MAAM,WAAW,CAAC,KAAK,CAAC,mLAAmL,CAAC,CAAC;YAC7M,MAAM,WAAW,CAAC,KAAK,CAAC,mLAAmL,CAAC,CAAC;YAC7M,MAAM,WAAW,CAAC,KAAK,CAAC,yLAAyL,CAAC,CAAC;YACnN,MAAM,WAAW,CAAC,KAAK,CAAC,uMAAuM,CAAC,CAAC;QACrO,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;YAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;YAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;YAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;YAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;YAC7G,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAC5D,CAAC;KAAA;CAEJ;AAvBD,4FAuBC"}
|
|
@@ -3586,6 +3586,11 @@
|
|
|
3586
3586
|
"signature": "4852f73f88cf15b01fcabd1312040d3839397b78fb7d94659b1532f5be9488ea",
|
|
3587
3587
|
"affectsGlobalScope": false
|
|
3588
3588
|
},
|
|
3589
|
+
"../src/migrations/1699601410949-promote_to_production_10_11_2023.ts": {
|
|
3590
|
+
"version": "a59f5811c91378d7a9cd48a34159fbdf0ff22b39368fd0c41846599314f32fe7",
|
|
3591
|
+
"signature": "a72d8a43d0489caa35edae27045acf26586dcb87cff11535f89a7ecaf3ae90ac",
|
|
3592
|
+
"affectsGlobalScope": false
|
|
3593
|
+
},
|
|
3589
3594
|
"../src/migrations/execute/index.ts": {
|
|
3590
3595
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3591
3596
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -6638,6 +6643,9 @@
|
|
|
6638
6643
|
"../src/migrations/1697858770679-user_channel.ts": [
|
|
6639
6644
|
"../node_modules/typeorm/index.d.ts"
|
|
6640
6645
|
],
|
|
6646
|
+
"../src/migrations/1699601410949-promote_to_production_10_11_2023.ts": [
|
|
6647
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6648
|
+
],
|
|
6641
6649
|
"../src/migrations/execute/index.ts": [
|
|
6642
6650
|
"../src/config/connect.ts"
|
|
6643
6651
|
],
|
|
@@ -9545,6 +9553,9 @@
|
|
|
9545
9553
|
"../src/migrations/1697858770679-user_channel.ts": [
|
|
9546
9554
|
"../node_modules/typeorm/index.d.ts"
|
|
9547
9555
|
],
|
|
9556
|
+
"../src/migrations/1699601410949-promote_to_production_10_11_2023.ts": [
|
|
9557
|
+
"../node_modules/typeorm/index.d.ts"
|
|
9558
|
+
],
|
|
9548
9559
|
"../src/migrations/index.ts": [
|
|
9549
9560
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
9550
9561
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -10420,6 +10431,7 @@
|
|
|
10420
10431
|
"../src/migrations/1696608295188-compareat-line-items-1.ts",
|
|
10421
10432
|
"../src/migrations/1697724057621-promote_to_production.ts",
|
|
10422
10433
|
"../src/migrations/1697858770679-user_channel.ts",
|
|
10434
|
+
"../src/migrations/1699601410949-promote_to_production_10_11_2023.ts",
|
|
10423
10435
|
"../src/migrations/execute/index.ts",
|
|
10424
10436
|
"../src/migrations/index.ts",
|
|
10425
10437
|
"../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.130",
|
|
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.130",
|
|
25
|
+
"@reachu/utils": "1.0.130",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class promoteToPRODUCTION101120231699601410949 implements MigrationInterface {
|
|
4
|
+
name = 'promoteToPRODUCTION101120231699601410949'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`CREATE TABLE \`channel_group\` (\`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), \`deleted_at\` datetime(6) NULL, \`id\` int NOT NULL AUTO_INCREMENT, \`channel_user_id\` int NULL, \`product_id\` int NULL, \`variant_id\` int NULL, \`collection_id\` varchar(10) NULL, \`collection_shared_id\` int NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`use_messaging_queue\` tinyint NULL DEFAULT 1`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_cdf9edf073c9e94025289a1d19b\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_45950478a423fdc46b17aca77c1\` FOREIGN KEY (\`product_id\`) REFERENCES \`product\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_7ad32bbee5d7964429d47cacd0a\` FOREIGN KEY (\`variant_id\`) REFERENCES \`variant\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
12
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_8fcd2dd06554030ebeaedb6336b\` FOREIGN KEY (\`collection_id\`) REFERENCES \`collection\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
13
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` ADD CONSTRAINT \`FK_5551f4b45bb31950e8410204a57\` FOREIGN KEY (\`collection_shared_id\`) REFERENCES \`collection_shared\`(\`id\`) ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_5551f4b45bb31950e8410204a57\``);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_8fcd2dd06554030ebeaedb6336b\``);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_7ad32bbee5d7964429d47cacd0a\``);
|
|
20
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_45950478a423fdc46b17aca77c1\``);
|
|
21
|
+
await queryRunner.query(`ALTER TABLE \`channel_group\` DROP FOREIGN KEY \`FK_cdf9edf073c9e94025289a1d19b\``);
|
|
22
|
+
await queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`use_messaging_queue\``);
|
|
23
|
+
await queryRunner.query(`DROP TABLE \`channel_group\``);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|