@reachu/database 1.0.89 → 1.0.90

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.
@@ -0,0 +1,6 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+ export declare class migrationPreDevelopApiKeyChannel1687997223199 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.migrationPreDevelopApiKeyChannel1687997223199 = void 0;
13
+ class migrationPreDevelopApiKeyChannel1687997223199 {
14
+ constructor() {
15
+ this.name = 'migrationPreDevelopApiKeyChannel1687997223199';
16
+ }
17
+ up(queryRunner) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP FOREIGN KEY \`FK_adc2206f21efb67f9f6425a4ce8\``);
20
+ yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP COLUMN \`channel_user_id\``);
21
+ yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`user_channel_api_key_id\` int NULL`);
22
+ yield queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_83f345b5912388def4fa4253040\` FOREIGN KEY (\`user_channel_api_key_id\`) REFERENCES \`user_channel_api_key\`(\`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 \`channel_user\` DROP FOREIGN KEY \`FK_83f345b5912388def4fa4253040\``);
28
+ yield queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`user_channel_api_key_id\``);
29
+ yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD \`channel_user_id\` int NULL`);
30
+ yield queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD CONSTRAINT \`FK_adc2206f21efb67f9f6425a4ce8\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
31
+ });
32
+ }
33
+ }
34
+ exports.migrationPreDevelopApiKeyChannel1687997223199 = migrationPreDevelopApiKeyChannel1687997223199;
35
+ //# sourceMappingURL=1687997223199-migration-pre-develop-api-key-channel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1687997223199-migration-pre-develop-api-key-channel.js","sourceRoot":"","sources":["../../src/migrations/1687997223199-migration-pre-develop-api-key-channel.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,6CAA6C;IAA1D;QACI,SAAI,GAAG,+CAA+C,CAAA;IAgB1D,CAAC;IAdgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,0FAA0F,CAAC,CAAC;YACpH,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;YAChG,MAAM,WAAW,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;YACjG,MAAM,WAAW,CAAC,KAAK,CAAC,8MAA8M,CAAC,CAAC;QAC5O,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,kFAAkF,CAAC,CAAC;YAC5G,MAAM,WAAW,CAAC,KAAK,CAAC,sEAAsE,CAAC,CAAC;YAChG,MAAM,WAAW,CAAC,KAAK,CAAC,uEAAuE,CAAC,CAAC;YACjG,MAAM,WAAW,CAAC,KAAK,CAAC,sMAAsM,CAAC,CAAC;QACpO,CAAC;KAAA;CAEJ;AAjBD,sGAiBC"}
@@ -3341,6 +3341,11 @@
3341
3341
  "signature": "baa58422d01771e5b5edeeee96b69158016ba96be10abd66c1c6ed5617d25233",
3342
3342
  "affectsGlobalScope": false
3343
3343
  },
3344
+ "../src/migrations/1687997223199-migration-pre-develop-api-key-channel.ts": {
3345
+ "version": "caeed7baff55fdd193f807dc880c1696cae19d3332fed5831430e1b6d58a9de3",
3346
+ "signature": "7afc2151cbbaecae0e9690e1b90a00b9210ecce9b48dd187849ce68b8ed13673",
3347
+ "affectsGlobalScope": false
3348
+ },
3344
3349
  "../src/migrations/1688049065964-add-title-endpoint.ts": {
3345
3350
  "version": "59d47d888ab3c181b0cba9019fcb67081c68baf9a8624e765adb29a9990ca966",
3346
3351
  "signature": "06e95c632f07baf87755f449183c9093b760c51393e0114aea440e0d929c2823",
@@ -6219,6 +6224,9 @@
6219
6224
  "../src/migrations/1687993176652-add-info-to-auth-2.ts": [
6220
6225
  "../node_modules/typeorm/index.d.ts"
6221
6226
  ],
6227
+ "../src/migrations/1687997223199-migration-pre-develop-api-key-channel.ts": [
6228
+ "../node_modules/typeorm/index.d.ts"
6229
+ ],
6222
6230
  "../src/migrations/1688049065964-add-title-endpoint.ts": [
6223
6231
  "../node_modules/typeorm/index.d.ts"
6224
6232
  ],
@@ -8950,6 +8958,9 @@
8950
8958
  "../src/migrations/1687993176652-add-info-to-auth-2.ts": [
8951
8959
  "../node_modules/typeorm/index.d.ts"
8952
8960
  ],
8961
+ "../src/migrations/1687997223199-migration-pre-develop-api-key-channel.ts": [
8962
+ "../node_modules/typeorm/index.d.ts"
8963
+ ],
8953
8964
  "../src/migrations/1688049065964-add-title-endpoint.ts": [
8954
8965
  "../node_modules/typeorm/index.d.ts"
8955
8966
  ],
@@ -9769,6 +9780,7 @@
9769
9780
  "../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts",
9770
9781
  "../src/migrations/1687981491374-add-info-to-auth.ts",
9771
9782
  "../src/migrations/1687993176652-add-info-to-auth-2.ts",
9783
+ "../src/migrations/1687997223199-migration-pre-develop-api-key-channel.ts",
9772
9784
  "../src/migrations/1688049065964-add-title-endpoint.ts",
9773
9785
  "../src/migrations/execute/index.ts",
9774
9786
  "../src/migrations/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reachu/database",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
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.89",
25
- "@reachu/utils": "1.0.89",
24
+ "@reachu/logger": "1.0.90",
25
+ "@reachu/utils": "1.0.90",
26
26
  "dotenv": "8.0.0",
27
27
  "express": "4.17.1",
28
28
  "mysql2": "1.5.2",
@@ -0,0 +1,20 @@
1
+ import {MigrationInterface, QueryRunner} from "typeorm";
2
+
3
+ export class migrationPreDevelopApiKeyChannel1687997223199 implements MigrationInterface {
4
+ name = 'migrationPreDevelopApiKeyChannel1687997223199'
5
+
6
+ public async up(queryRunner: QueryRunner): Promise<void> {
7
+ await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP FOREIGN KEY \`FK_adc2206f21efb67f9f6425a4ce8\``);
8
+ await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` DROP COLUMN \`channel_user_id\``);
9
+ await queryRunner.query(`ALTER TABLE \`channel_user\` ADD \`user_channel_api_key_id\` int NULL`);
10
+ await queryRunner.query(`ALTER TABLE \`channel_user\` ADD CONSTRAINT \`FK_83f345b5912388def4fa4253040\` FOREIGN KEY (\`user_channel_api_key_id\`) REFERENCES \`user_channel_api_key\`(\`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 \`channel_user\` DROP FOREIGN KEY \`FK_83f345b5912388def4fa4253040\``);
15
+ await queryRunner.query(`ALTER TABLE \`channel_user\` DROP COLUMN \`user_channel_api_key_id\``);
16
+ await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD \`channel_user_id\` int NULL`);
17
+ await queryRunner.query(`ALTER TABLE \`user_channel_api_key\` ADD CONSTRAINT \`FK_adc2206f21efb67f9f6425a4ce8\` FOREIGN KEY (\`channel_user_id\`) REFERENCES \`channel_user\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
18
+ }
19
+
20
+ }