@reachu/database 1.0.61 → 1.0.63
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/1683656076895-promote_to_production_09_05_2023.d.ts +6 -0
- package/dist/migrations/1683656076895-promote_to_production_09_05_2023.js +35 -0
- package/dist/migrations/1683656076895-promote_to_production_09_05_2023.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +12 -0
- package/package.json +3 -3
- package/src/migrations/1683656076895-promote_to_production_09_05_2023.ts +20 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class promoteToProduction090520231683656076895 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.promoteToProduction090520231683656076895 = void 0;
|
|
13
|
+
class promoteToProduction090520231683656076895 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'promoteToProduction090520231683656076895';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`DROP INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` ON \`user\``);
|
|
20
|
+
yield queryRunner.query(`CREATE TABLE \`translate\` (\`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), \`id\` varchar(36) NOT NULL, \`deleted_at\` datetime(6) NULL, \`source\` text NOT NULL, \`target\` text NOT NULL, \`values\` varchar(21844) NOT NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`plan\` DROP COLUMN \`options\``);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`plan\` ADD \`options\` varchar(21844) NULL`);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
down(queryRunner) {
|
|
26
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
yield queryRunner.query(`ALTER TABLE \`plan\` DROP COLUMN \`options\``);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`plan\` ADD \`options\` varchar(255) NULL`);
|
|
29
|
+
yield queryRunner.query(`DROP TABLE \`translate\``);
|
|
30
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` ON \`user\` (\`user_count_plan_id\`)`);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.promoteToProduction090520231683656076895 = promoteToProduction090520231683656076895;
|
|
35
|
+
//# sourceMappingURL=1683656076895-promote_to_production_09_05_2023.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1683656076895-promote_to_production_09_05_2023.js","sourceRoot":"","sources":["../../src/migrations/1683656076895-promote_to_production_09_05_2023.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,wCAAwC;IAArD;QACI,SAAI,GAAG,0CAA0C,CAAA;IAgBrD,CAAC;IAdgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,2DAA2D,CAAC,CAAC;YACrF,MAAM,WAAW,CAAC,KAAK,CAAC,0XAA0X,CAAC,CAAC;YACpZ,MAAM,WAAW,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;YACxE,MAAM,WAAW,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;QACxF,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,8CAA8C,CAAC,CAAC;YACxE,MAAM,WAAW,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;YAClF,MAAM,WAAW,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;YACpD,MAAM,WAAW,CAAC,KAAK,CAAC,6FAA6F,CAAC,CAAC;QAC3H,CAAC;KAAA;CAEJ;AAjBD,4FAiBC"}
|
|
@@ -3211,6 +3211,11 @@
|
|
|
3211
3211
|
"signature": "c70dd884837e5718990fef267d89aff5390410454e6495ba9da9509710276bc4",
|
|
3212
3212
|
"affectsGlobalScope": false
|
|
3213
3213
|
},
|
|
3214
|
+
"../src/migrations/1683656076895-promote_to_production_09_05_2023.ts": {
|
|
3215
|
+
"version": "eabb6b53e4b055b309686b8a3f6ec91ecbc28dd5986f486f15bae5ace237595a",
|
|
3216
|
+
"signature": "8641289d7b36adc4ad9c0ac0e96393a95b271dfd0967cea4c439b03638953d8a",
|
|
3217
|
+
"affectsGlobalScope": false
|
|
3218
|
+
},
|
|
3214
3219
|
"../src/migrations/execute/index.ts": {
|
|
3215
3220
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3216
3221
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -5993,6 +5998,9 @@
|
|
|
5993
5998
|
"../src/migrations/1683322405116-translate.ts": [
|
|
5994
5999
|
"../node_modules/typeorm/index.d.ts"
|
|
5995
6000
|
],
|
|
6001
|
+
"../src/migrations/1683656076895-promote_to_production_09_05_2023.ts": [
|
|
6002
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6003
|
+
],
|
|
5996
6004
|
"../src/migrations/execute/index.ts": [
|
|
5997
6005
|
"../src/config/connect.ts"
|
|
5998
6006
|
],
|
|
@@ -8630,6 +8638,9 @@
|
|
|
8630
8638
|
"../src/migrations/1683322405116-translate.ts": [
|
|
8631
8639
|
"../node_modules/typeorm/index.d.ts"
|
|
8632
8640
|
],
|
|
8641
|
+
"../src/migrations/1683656076895-promote_to_production_09_05_2023.ts": [
|
|
8642
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8643
|
+
],
|
|
8633
8644
|
"../src/migrations/index.ts": [
|
|
8634
8645
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8635
8646
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9418,6 +9429,7 @@
|
|
|
9418
9429
|
"../src/migrations/1682702844783-promote_to_production_28_04_2023.ts",
|
|
9419
9430
|
"../src/migrations/1683077989567-update_plan.ts",
|
|
9420
9431
|
"../src/migrations/1683322405116-translate.ts",
|
|
9432
|
+
"../src/migrations/1683656076895-promote_to_production_09_05_2023.ts",
|
|
9421
9433
|
"../src/migrations/execute/index.ts",
|
|
9422
9434
|
"../src/migrations/index.ts",
|
|
9423
9435
|
"../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.63",
|
|
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.63",
|
|
25
|
+
"@reachu/utils": "1.0.63",
|
|
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 promoteToProduction090520231683656076895 implements MigrationInterface {
|
|
4
|
+
name = 'promoteToProduction090520231683656076895'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`DROP INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` ON \`user\``);
|
|
8
|
+
await queryRunner.query(`CREATE TABLE \`translate\` (\`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), \`id\` varchar(36) NOT NULL, \`deleted_at\` datetime(6) NULL, \`source\` text NOT NULL, \`target\` text NOT NULL, \`values\` varchar(21844) NOT NULL, PRIMARY KEY (\`id\`)) ENGINE=InnoDB`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`plan\` DROP COLUMN \`options\``);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`plan\` ADD \`options\` varchar(21844) NULL`);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
14
|
+
await queryRunner.query(`ALTER TABLE \`plan\` DROP COLUMN \`options\``);
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`plan\` ADD \`options\` varchar(255) NULL`);
|
|
16
|
+
await queryRunner.query(`DROP TABLE \`translate\``);
|
|
17
|
+
await queryRunner.query(`CREATE UNIQUE INDEX \`IDX_6c8d3e69e34f746d1f30e322a6\` ON \`user\` (\`user_count_plan_id\`)`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|