@hedhog/admin 0.0.81 → 0.0.83
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/__migrations/migrate-01.d.ts +6 -0
- package/dist/__migrations/migrate-01.d.ts.map +1 -0
- package/dist/__migrations/migrate-01.js +80 -0
- package/dist/__migrations/migrate-01.js.map +1 -0
- package/dist/__migrations/migrate-02.d.ts +6 -0
- package/dist/__migrations/migrate-02.d.ts.map +1 -0
- package/dist/__migrations/migrate-02.js +68 -0
- package/dist/__migrations/migrate-02.js.map +1 -0
- package/dist/__migrations/migrate-03.d.ts +6 -0
- package/dist/__migrations/migrate-03.d.ts.map +1 -0
- package/dist/__migrations/migrate-03.js +90 -0
- package/dist/__migrations/migrate-03.js.map +1 -0
- package/dist/__migrations/migrate-04.d.ts +6 -0
- package/dist/__migrations/migrate-04.d.ts.map +1 -0
- package/dist/__migrations/migrate-04.js +63 -0
- package/dist/__migrations/migrate-04.js.map +1 -0
- package/dist/__migrations/migrate-05.d.ts +6 -0
- package/dist/__migrations/migrate-05.d.ts.map +1 -0
- package/dist/__migrations/migrate-05.js +100 -0
- package/dist/__migrations/migrate-05.js.map +1 -0
- package/dist/__migrations/migrate-06.d.ts +6 -0
- package/dist/__migrations/migrate-06.d.ts.map +1 -0
- package/dist/__migrations/migrate-06.js +37 -0
- package/dist/__migrations/migrate-06.js.map +1 -0
- package/dist/__migrations/migrate-07.d.ts +6 -0
- package/dist/__migrations/migrate-07.d.ts.map +1 -0
- package/dist/__migrations/migrate-07.js +59 -0
- package/dist/__migrations/migrate-07.js.map +1 -0
- package/dist/__migrations/migrate-08.d.ts +6 -0
- package/dist/__migrations/migrate-08.d.ts.map +1 -0
- package/dist/__migrations/migrate-08.js +39 -0
- package/dist/__migrations/migrate-08.js.map +1 -0
- package/dist/__migrations/migrate-09.d.ts +6 -0
- package/dist/__migrations/migrate-09.d.ts.map +1 -0
- package/dist/__migrations/migrate-09.js +39 -0
- package/dist/__migrations/migrate-09.js.map +1 -0
- package/dist/__migrations/migrate-10.d.ts +6 -0
- package/dist/__migrations/migrate-10.d.ts.map +1 -0
- package/dist/__migrations/migrate-10.js +39 -0
- package/dist/__migrations/migrate-10.js.map +1 -0
- package/dist/__migrations/migrate-11.d.ts +6 -0
- package/dist/__migrations/migrate-11.d.ts.map +1 -0
- package/dist/__migrations/migrate-11.js +39 -0
- package/dist/__migrations/migrate-11.js.map +1 -0
- package/dist/__migrations/migrate-12.d.ts +6 -0
- package/dist/__migrations/migrate-12.d.ts.map +1 -0
- package/dist/__migrations/migrate-12.js +39 -0
- package/dist/__migrations/migrate-12.js.map +1 -0
- package/dist/__migrations/migrate-13.d.ts +6 -0
- package/dist/__migrations/migrate-13.d.ts.map +1 -0
- package/dist/__migrations/migrate-13.js +30 -0
- package/dist/__migrations/migrate-13.js.map +1 -0
- package/dist/__migrations/migrate-14.d.ts +6 -0
- package/dist/__migrations/migrate-14.d.ts.map +1 -0
- package/dist/__migrations/migrate-14.js +83 -0
- package/dist/__migrations/migrate-14.js.map +1 -0
- package/dist/__migrations/migrate-15.d.ts +6 -0
- package/dist/__migrations/migrate-15.d.ts.map +1 -0
- package/dist/__migrations/migrate-15.js +25 -0
- package/dist/__migrations/migrate-15.js.map +1 -0
- package/dist/__migrations/migrate-16.d.ts +6 -0
- package/dist/__migrations/migrate-16.d.ts.map +1 -0
- package/dist/__migrations/migrate-16.js +61 -0
- package/dist/__migrations/migrate-16.js.map +1 -0
- package/dist/__migrations/migrate-17.d.ts +6 -0
- package/dist/__migrations/migrate-17.d.ts.map +1 -0
- package/dist/__migrations/migrate-17.js +31 -0
- package/dist/__migrations/migrate-17.js.map +1 -0
- package/dist/__migrations/migrate-18.d.ts +6 -0
- package/dist/__migrations/migrate-18.d.ts.map +1 -0
- package/dist/__migrations/migrate-18.js +41 -0
- package/dist/__migrations/migrate-18.js.map +1 -0
- package/dist/__migrations/migrate-19.d.ts +6 -0
- package/dist/__migrations/migrate-19.d.ts.map +1 -0
- package/dist/__migrations/migrate-19.js +175 -0
- package/dist/__migrations/migrate-19.js.map +1 -0
- package/dist/__migrations/migrate-20.d.ts +6 -0
- package/dist/__migrations/migrate-20.d.ts.map +1 -0
- package/dist/__migrations/migrate-20.js +310 -0
- package/dist/__migrations/migrate-20.js.map +1 -0
- package/hedhog.yaml +487 -0
- package/package.json +1 -1
- package/src/migrations/migrate-01.ts +0 -86
- package/src/migrations/migrate-02.ts +0 -77
- package/src/migrations/migrate-03.ts +0 -102
- package/src/migrations/migrate-04.ts +0 -71
- package/src/migrations/migrate-05.ts +0 -119
- package/src/migrations/migrate-06.ts +0 -37
- package/src/migrations/migrate-07.ts +0 -66
- package/src/migrations/migrate-08.ts +0 -44
- package/src/migrations/migrate-09.ts +0 -44
- package/src/migrations/migrate-10.ts +0 -44
- package/src/migrations/migrate-11.ts +0 -45
- package/src/migrations/migrate-12.ts +0 -44
- package/src/migrations/migrate-13.ts +0 -28
- package/src/migrations/migrate-14.ts +0 -81
- package/src/migrations/migrate-15.ts +0 -23
- package/src/migrations/migrate-16.ts +0 -59
- package/src/migrations/migrate-17.ts +0 -29
- package/src/migrations/migrate-18.ts +0 -39
- package/src/migrations/migrate-19.ts +0 -186
- package/src/migrations/migrate-20.ts +0 -308
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
const utils_1 = require("@hedhog/utils");
|
5
|
+
const typeorm_1 = require("typeorm");
|
6
|
+
class Migrate {
|
7
|
+
async up(queryRunner) {
|
8
|
+
await queryRunner.createTable(new typeorm_1.Table({
|
9
|
+
name: 'role_menus',
|
10
|
+
columns: [
|
11
|
+
(0, utils_1.foreignColumn)({ name: 'role_id', isPrimary: true }),
|
12
|
+
(0, utils_1.foreignColumn)({ name: 'menu_id', isPrimary: true }),
|
13
|
+
(0, utils_1.timestampColumn)(),
|
14
|
+
(0, utils_1.timestampColumn)('updated_at'),
|
15
|
+
],
|
16
|
+
}));
|
17
|
+
await queryRunner.createForeignKeys('role_menus', [
|
18
|
+
new typeorm_1.TableForeignKey({
|
19
|
+
columnNames: ['role_id'],
|
20
|
+
referencedColumnNames: ['id'],
|
21
|
+
referencedTableName: 'roles',
|
22
|
+
onDelete: 'CASCADE',
|
23
|
+
name: 'fk_role_menus_roles',
|
24
|
+
}),
|
25
|
+
new typeorm_1.TableForeignKey({
|
26
|
+
columnNames: ['menu_id'],
|
27
|
+
referencedColumnNames: ['id'],
|
28
|
+
referencedTableName: 'menus',
|
29
|
+
onDelete: 'CASCADE',
|
30
|
+
name: 'fk_role_menus_menus',
|
31
|
+
}),
|
32
|
+
]);
|
33
|
+
}
|
34
|
+
async down(queryRunner) {
|
35
|
+
await queryRunner.dropTable('role_menus');
|
36
|
+
}
|
37
|
+
}
|
38
|
+
exports.Migrate = Migrate;
|
39
|
+
//# sourceMappingURL=migrate-08.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-08.js","sourceRoot":"","sources":["../../src/__migrations/migrate-08.ts"],"names":[],"mappings":";;;AAAA,yCAA+D;AAC/D,qCAKiB;AAEjB,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE;gBACP,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACnD,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACnD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,iBAAiB,CAAC,YAAY,EAAE;YAChD,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,SAAS,CAAC;gBACxB,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,OAAO;gBAC5B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,qBAAqB;aAC5B,CAAC;YACF,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,SAAS,CAAC;gBACxB,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,OAAO;gBAC5B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,qBAAqB;aAC5B,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAC5C,CAAC;CACF;AAnCD,0BAmCC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-09.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-09.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,WAAW,EAGZ,MAAM,SAAS,CAAC;AAEjB,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IA+B3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAGpC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
const utils_1 = require("@hedhog/utils");
|
5
|
+
const typeorm_1 = require("typeorm");
|
6
|
+
class Migrate {
|
7
|
+
async up(queryRunner) {
|
8
|
+
await queryRunner.createTable(new typeorm_1.Table({
|
9
|
+
name: 'route_screens',
|
10
|
+
columns: [
|
11
|
+
(0, utils_1.foreignColumn)({ name: 'route_id', isPrimary: true }),
|
12
|
+
(0, utils_1.foreignColumn)({ name: 'screen_id', isPrimary: true }),
|
13
|
+
(0, utils_1.timestampColumn)(),
|
14
|
+
(0, utils_1.timestampColumn)('updated_at'),
|
15
|
+
],
|
16
|
+
}));
|
17
|
+
await queryRunner.createForeignKeys('route_screens', [
|
18
|
+
new typeorm_1.TableForeignKey({
|
19
|
+
columnNames: ['route_id'],
|
20
|
+
referencedColumnNames: ['id'],
|
21
|
+
referencedTableName: 'routes',
|
22
|
+
onDelete: 'CASCADE',
|
23
|
+
name: 'fk_route_screens_routes',
|
24
|
+
}),
|
25
|
+
new typeorm_1.TableForeignKey({
|
26
|
+
columnNames: ['screen_id'],
|
27
|
+
referencedColumnNames: ['id'],
|
28
|
+
referencedTableName: 'screens',
|
29
|
+
onDelete: 'CASCADE',
|
30
|
+
name: 'fk_route_screens_screens',
|
31
|
+
}),
|
32
|
+
]);
|
33
|
+
}
|
34
|
+
async down(queryRunner) {
|
35
|
+
await queryRunner.dropTable('route_screens');
|
36
|
+
}
|
37
|
+
}
|
38
|
+
exports.Migrate = Migrate;
|
39
|
+
//# sourceMappingURL=migrate-09.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-09.js","sourceRoot":"","sources":["../../src/__migrations/migrate-09.ts"],"names":[],"mappings":";;;AAAA,yCAA+D;AAC/D,qCAKiB;AAEjB,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE;gBACP,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACpD,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACrD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,iBAAiB,CAAC,eAAe,EAAE;YACnD,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,UAAU,CAAC;gBACzB,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,QAAQ;gBAC7B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,yBAAyB;aAChC,CAAC;YACF,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,WAAW,CAAC;gBAC1B,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,SAAS;gBAC9B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,0BAA0B;aACjC,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;IAC/C,CAAC;CACF;AAnCD,0BAmCC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-10.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-10.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,WAAW,EAGZ,MAAM,SAAS,CAAC;AAEjB,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IA+B3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAGpC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
const utils_1 = require("@hedhog/utils");
|
5
|
+
const typeorm_1 = require("typeorm");
|
6
|
+
class Migrate {
|
7
|
+
async up(queryRunner) {
|
8
|
+
await queryRunner.createTable(new typeorm_1.Table({
|
9
|
+
name: 'role_screens',
|
10
|
+
columns: [
|
11
|
+
(0, utils_1.foreignColumn)({ name: 'role_id', isPrimary: true }),
|
12
|
+
(0, utils_1.foreignColumn)({ name: 'screen_id', isPrimary: true }),
|
13
|
+
(0, utils_1.timestampColumn)(),
|
14
|
+
(0, utils_1.timestampColumn)('updated_at'),
|
15
|
+
],
|
16
|
+
}));
|
17
|
+
await queryRunner.createForeignKeys('role_screens', [
|
18
|
+
new typeorm_1.TableForeignKey({
|
19
|
+
columnNames: ['role_id'],
|
20
|
+
referencedColumnNames: ['id'],
|
21
|
+
referencedTableName: 'roles',
|
22
|
+
onDelete: 'CASCADE',
|
23
|
+
name: 'fk_role_screens_roles',
|
24
|
+
}),
|
25
|
+
new typeorm_1.TableForeignKey({
|
26
|
+
columnNames: ['screen_id'],
|
27
|
+
referencedColumnNames: ['id'],
|
28
|
+
referencedTableName: 'screens',
|
29
|
+
onDelete: 'CASCADE',
|
30
|
+
name: 'fk_role_screens_screens',
|
31
|
+
}),
|
32
|
+
]);
|
33
|
+
}
|
34
|
+
async down(queryRunner) {
|
35
|
+
await queryRunner.dropTable('role_screens');
|
36
|
+
}
|
37
|
+
}
|
38
|
+
exports.Migrate = Migrate;
|
39
|
+
//# sourceMappingURL=migrate-10.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-10.js","sourceRoot":"","sources":["../../src/__migrations/migrate-10.ts"],"names":[],"mappings":";;;AAAA,yCAA+D;AAC/D,qCAKiB;AAEjB,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE;gBACP,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACnD,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACrD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,iBAAiB,CAAC,cAAc,EAAE;YAClD,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,SAAS,CAAC;gBACxB,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,OAAO;gBAC5B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,uBAAuB;aAC9B,CAAC;YACF,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,WAAW,CAAC;gBAC1B,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,SAAS;gBAC9B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,yBAAyB;aAChC,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC9C,CAAC;CACF;AAnCD,0BAmCC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-11.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-11.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,WAAW,EAGZ,MAAM,SAAS,CAAC;AAEjB,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IAgC3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAGpC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
const utils_1 = require("@hedhog/utils");
|
5
|
+
const typeorm_1 = require("typeorm");
|
6
|
+
class Migrate {
|
7
|
+
async up(queryRunner) {
|
8
|
+
await queryRunner.createTable(new typeorm_1.Table({
|
9
|
+
name: 'role_users',
|
10
|
+
columns: [
|
11
|
+
(0, utils_1.foreignColumn)({ name: 'role_id', isPrimary: true }),
|
12
|
+
(0, utils_1.foreignColumn)({ name: 'user_id', isPrimary: true }),
|
13
|
+
(0, utils_1.timestampColumn)(),
|
14
|
+
(0, utils_1.timestampColumn)('updated_at'),
|
15
|
+
],
|
16
|
+
}));
|
17
|
+
await queryRunner.createForeignKeys('role_users', [
|
18
|
+
new typeorm_1.TableForeignKey({
|
19
|
+
columnNames: ['role_id'],
|
20
|
+
referencedColumnNames: ['id'],
|
21
|
+
referencedTableName: 'roles',
|
22
|
+
onDelete: 'CASCADE',
|
23
|
+
name: 'fk_role_users_roles',
|
24
|
+
}),
|
25
|
+
new typeorm_1.TableForeignKey({
|
26
|
+
columnNames: ['user_id'],
|
27
|
+
referencedColumnNames: ['id'],
|
28
|
+
referencedTableName: 'users',
|
29
|
+
onDelete: 'CASCADE',
|
30
|
+
name: 'fk_role_users_users',
|
31
|
+
}),
|
32
|
+
]);
|
33
|
+
}
|
34
|
+
async down(queryRunner) {
|
35
|
+
await queryRunner.dropTable('role_users');
|
36
|
+
}
|
37
|
+
}
|
38
|
+
exports.Migrate = Migrate;
|
39
|
+
//# sourceMappingURL=migrate-11.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-11.js","sourceRoot":"","sources":["../../src/__migrations/migrate-11.ts"],"names":[],"mappings":";;;AAAA,yCAA+D;AAC/D,qCAKiB;AAEjB,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE;gBACP,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACnD,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACnD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,iBAAiB,CAAC,YAAY,EAAE;YAChD,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,SAAS,CAAC;gBACxB,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,OAAO;gBAC5B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,qBAAqB;aAC5B,CAAC;YAEF,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,SAAS,CAAC;gBACxB,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,OAAO;gBAC5B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,qBAAqB;aAC5B,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAC5C,CAAC;CACF;AApCD,0BAoCC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-12.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-12.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kBAAkB,EAClB,WAAW,EAGZ,MAAM,SAAS,CAAC;AAEjB,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IA+B3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAGpC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
const utils_1 = require("@hedhog/utils");
|
5
|
+
const typeorm_1 = require("typeorm");
|
6
|
+
class Migrate {
|
7
|
+
async up(queryRunner) {
|
8
|
+
await queryRunner.createTable(new typeorm_1.Table({
|
9
|
+
name: 'role_routes',
|
10
|
+
columns: [
|
11
|
+
(0, utils_1.foreignColumn)({ name: 'role_id', isPrimary: true }),
|
12
|
+
(0, utils_1.foreignColumn)({ name: 'route_id', isPrimary: true }),
|
13
|
+
(0, utils_1.timestampColumn)(),
|
14
|
+
(0, utils_1.timestampColumn)('updated_at'),
|
15
|
+
],
|
16
|
+
}));
|
17
|
+
await queryRunner.createForeignKeys('role_routes', [
|
18
|
+
new typeorm_1.TableForeignKey({
|
19
|
+
columnNames: ['role_id'],
|
20
|
+
referencedColumnNames: ['id'],
|
21
|
+
referencedTableName: 'roles',
|
22
|
+
onDelete: 'CASCADE',
|
23
|
+
name: 'fk_role_routes_roles',
|
24
|
+
}),
|
25
|
+
new typeorm_1.TableForeignKey({
|
26
|
+
columnNames: ['route_id'],
|
27
|
+
referencedColumnNames: ['id'],
|
28
|
+
referencedTableName: 'routes',
|
29
|
+
onDelete: 'CASCADE',
|
30
|
+
name: 'fk_role_routes_routes',
|
31
|
+
}),
|
32
|
+
]);
|
33
|
+
}
|
34
|
+
async down(queryRunner) {
|
35
|
+
await queryRunner.dropTable('role_routes');
|
36
|
+
}
|
37
|
+
}
|
38
|
+
exports.Migrate = Migrate;
|
39
|
+
//# sourceMappingURL=migrate-12.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-12.js","sourceRoot":"","sources":["../../src/__migrations/migrate-12.ts"],"names":[],"mappings":";;;AAAA,yCAA+D;AAC/D,qCAKiB;AAEjB,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B,MAAM,WAAW,CAAC,WAAW,CAC3B,IAAI,eAAK,CAAC;YACR,IAAI,EAAE,aAAa;YACnB,OAAO,EAAE;gBACP,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACnD,IAAA,qBAAa,EAAC,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;gBACpD,IAAA,uBAAe,GAAE;gBACjB,IAAA,uBAAe,EAAC,YAAY,CAAC;aAC9B;SACF,CAAC,CACH,CAAC;QAEF,MAAM,WAAW,CAAC,iBAAiB,CAAC,aAAa,EAAE;YACjD,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,SAAS,CAAC;gBACxB,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,OAAO;gBAC5B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,sBAAsB;aAC7B,CAAC;YACF,IAAI,yBAAe,CAAC;gBAClB,WAAW,EAAE,CAAC,UAAU,CAAC;gBACzB,qBAAqB,EAAE,CAAC,IAAI,CAAC;gBAC7B,mBAAmB,EAAE,QAAQ;gBAC7B,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,uBAAuB;aAC9B,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAC7C,CAAC;CACF;AAnCD,0BAmCC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-13.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-13.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IAqB3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAGpC"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
class Migrate {
|
5
|
+
async up(queryRunner) {
|
6
|
+
/*
|
7
|
+
const menus = await queryRunner.manager
|
8
|
+
.createQueryBuilder()
|
9
|
+
.select()
|
10
|
+
.from('menus', 'm')
|
11
|
+
.execute();
|
12
|
+
|
13
|
+
for (const menu of menus) {
|
14
|
+
await queryRunner.manager
|
15
|
+
.createQueryBuilder()
|
16
|
+
.insert()
|
17
|
+
.into('role_menus')
|
18
|
+
.values({
|
19
|
+
role_id: 1,
|
20
|
+
menu_id: menu.id,
|
21
|
+
});
|
22
|
+
}
|
23
|
+
*/
|
24
|
+
}
|
25
|
+
async down(queryRunner) {
|
26
|
+
await queryRunner.manager.delete('role_menus', { role_id: 1 });
|
27
|
+
}
|
28
|
+
}
|
29
|
+
exports.Migrate = Migrate;
|
30
|
+
//# sourceMappingURL=migrate-13.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-13.js","sourceRoot":"","sources":["../../src/__migrations/migrate-13.ts"],"names":[],"mappings":";;;AAEA,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B;;;;;;;;;;;;;;;;;cAiBM;IACR,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AAzBD,0BAyBC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-14.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-14.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IA0E3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAGpC"}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
class Migrate {
|
5
|
+
async up(queryRunner) {
|
6
|
+
/*
|
7
|
+
const screenIdScreen = await queryRunner.manager
|
8
|
+
.createQueryBuilder()
|
9
|
+
.select()
|
10
|
+
.from('screens', 's')
|
11
|
+
.where('slug = :slug', { slug: '/management/screens' })
|
12
|
+
.execute();
|
13
|
+
|
14
|
+
const screenIdRole = await queryRunner.manager
|
15
|
+
.createQueryBuilder()
|
16
|
+
.select()
|
17
|
+
.from('screens', 's')
|
18
|
+
.where('slug = :slug', { slug: '/management/roles' })
|
19
|
+
.execute();
|
20
|
+
|
21
|
+
const screenIdUser = await queryRunner.manager
|
22
|
+
.createQueryBuilder()
|
23
|
+
.select()
|
24
|
+
.from('screens', 's')
|
25
|
+
.where('slug = :slug', { slug: '/management/users' })
|
26
|
+
.execute();
|
27
|
+
|
28
|
+
const screenIdMenu = await queryRunner.manager
|
29
|
+
.createQueryBuilder()
|
30
|
+
.select()
|
31
|
+
.from('screens', 's')
|
32
|
+
.where('slug = :slug', { slug: '/management/menus' })
|
33
|
+
.execute();
|
34
|
+
|
35
|
+
const screenIdRoute = await queryRunner.manager
|
36
|
+
.createQueryBuilder()
|
37
|
+
.select()
|
38
|
+
.from('screens', 's')
|
39
|
+
.where('slug = :slug', { slug: '/management/routes' })
|
40
|
+
.execute();
|
41
|
+
|
42
|
+
const screenIdSetting = await queryRunner.manager
|
43
|
+
.createQueryBuilder()
|
44
|
+
.select()
|
45
|
+
.from('screens', 's')
|
46
|
+
.where('slug = :slug', { slug: '/management/settings' })
|
47
|
+
.execute();
|
48
|
+
|
49
|
+
for (const { url, screendId } of [
|
50
|
+
{ url: '/screens%', screendId: screenIdScreen[0].id },
|
51
|
+
{ url: '/roles%', screendId: screenIdRole[0].id },
|
52
|
+
{ url: '/users%', screendId: screenIdUser[0].id },
|
53
|
+
{ url: '/menus%', screendId: screenIdMenu[0].id },
|
54
|
+
{ url: '/routes%', screendId: screenIdRoute[0].id },
|
55
|
+
{ url: '/settings%', screendId: screenIdSetting[0].id },
|
56
|
+
]) {
|
57
|
+
const routesScreens = await queryRunner.manager
|
58
|
+
.createQueryBuilder()
|
59
|
+
.select()
|
60
|
+
.from('routes', 's')
|
61
|
+
.where('s.url LIKE :url', { url })
|
62
|
+
.execute();
|
63
|
+
|
64
|
+
for (const route of routesScreens) {
|
65
|
+
await queryRunner.manager
|
66
|
+
.createQueryBuilder()
|
67
|
+
.insert()
|
68
|
+
.into('route_screens')
|
69
|
+
.values({
|
70
|
+
route_id: route.id,
|
71
|
+
screen_id: screendId,
|
72
|
+
})
|
73
|
+
.execute();
|
74
|
+
}
|
75
|
+
}
|
76
|
+
*/
|
77
|
+
}
|
78
|
+
async down(queryRunner) {
|
79
|
+
await queryRunner.manager.delete('route_screens', {});
|
80
|
+
}
|
81
|
+
}
|
82
|
+
exports.Migrate = Migrate;
|
83
|
+
//# sourceMappingURL=migrate-14.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-14.js","sourceRoot":"","sources":["../../src/__migrations/migrate-14.ts"],"names":[],"mappings":";;;AAEA,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAsEI;IACN,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IACxD,CAAC;CACF;AA9ED,0BA8EC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-15.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-15.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IAe3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAIpC"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
class Migrate {
|
5
|
+
async up(queryRunner) {
|
6
|
+
/*
|
7
|
+
await queryRunner.manager
|
8
|
+
.createQueryBuilder()
|
9
|
+
.insert()
|
10
|
+
.into('role_users', ['role_id', 'user_id'])
|
11
|
+
.values([
|
12
|
+
{ role_id: 1, user_id: 1 },
|
13
|
+
{ role_id: 2, user_id: 2 },
|
14
|
+
{ role_id: 3, user_id: 2 },
|
15
|
+
])
|
16
|
+
.execute();
|
17
|
+
*/
|
18
|
+
}
|
19
|
+
async down(queryRunner) {
|
20
|
+
await queryRunner.manager.delete('role_users', { role_id: 1 });
|
21
|
+
await queryRunner.manager.delete('role_users', { role_id: 2 });
|
22
|
+
}
|
23
|
+
}
|
24
|
+
exports.Migrate = Migrate;
|
25
|
+
//# sourceMappingURL=migrate-15.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-15.js","sourceRoot":"","sources":["../../src/__migrations/migrate-15.ts"],"names":[],"mappings":";;;AAEA,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B;;;;;;;;;;;YAWI;IACN,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAC/D,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AApBD,0BAoBC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-16.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-16.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IAmD3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAIpC"}
|
@@ -0,0 +1,61 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
class Migrate {
|
5
|
+
async up(queryRunner) {
|
6
|
+
/*
|
7
|
+
const routes = await queryRunner.manager
|
8
|
+
.createQueryBuilder()
|
9
|
+
.select()
|
10
|
+
.from('routes', 'r')
|
11
|
+
.execute();
|
12
|
+
|
13
|
+
for (const route of routes) {
|
14
|
+
await queryRunner.manager
|
15
|
+
.createQueryBuilder()
|
16
|
+
.insert()
|
17
|
+
.into('role_routes', ['role_id', 'route_id'])
|
18
|
+
.values({
|
19
|
+
role_id: 1,
|
20
|
+
route_id: route.id,
|
21
|
+
})
|
22
|
+
.execute();
|
23
|
+
}
|
24
|
+
|
25
|
+
await queryRunner.manager
|
26
|
+
.createQueryBuilder()
|
27
|
+
.insert()
|
28
|
+
.into('role_routes', ['role_id', 'route_id'])
|
29
|
+
.values({
|
30
|
+
role_id: 2,
|
31
|
+
route_id: 3,
|
32
|
+
})
|
33
|
+
.execute();
|
34
|
+
|
35
|
+
const routesScreens = await queryRunner.manager
|
36
|
+
.createQueryBuilder()
|
37
|
+
.select()
|
38
|
+
.from('routes', 's')
|
39
|
+
.where('s.url LIKE :url', { url: '/screens%' })
|
40
|
+
.execute();
|
41
|
+
|
42
|
+
for (const route of routesScreens) {
|
43
|
+
await queryRunner.manager
|
44
|
+
.createQueryBuilder()
|
45
|
+
.insert()
|
46
|
+
.into('role_routes', ['role_id', 'route_id'])
|
47
|
+
.values({
|
48
|
+
role_id: 2,
|
49
|
+
route_id: route.id,
|
50
|
+
})
|
51
|
+
.execute();
|
52
|
+
}
|
53
|
+
*/
|
54
|
+
}
|
55
|
+
async down(queryRunner) {
|
56
|
+
await queryRunner.manager.delete('role_routes', { role_id: 1 });
|
57
|
+
await queryRunner.manager.delete('role_routes', { role_id: 2 });
|
58
|
+
}
|
59
|
+
}
|
60
|
+
exports.Migrate = Migrate;
|
61
|
+
//# sourceMappingURL=migrate-16.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-16.js","sourceRoot":"","sources":["../../src/__migrations/migrate-16.ts"],"names":[],"mappings":";;;AAEA,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+CM;IACR,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAChE,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IAClE,CAAC;CACF;AAxDD,0BAwDC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-17.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-17.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IAsB3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAGpC"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
class Migrate {
|
5
|
+
async up(queryRunner) {
|
6
|
+
/*
|
7
|
+
const screens = await queryRunner.manager
|
8
|
+
.createQueryBuilder()
|
9
|
+
.select()
|
10
|
+
.from('screens', 's')
|
11
|
+
.execute();
|
12
|
+
|
13
|
+
for (const screen of screens) {
|
14
|
+
await queryRunner.manager
|
15
|
+
.createQueryBuilder()
|
16
|
+
.insert()
|
17
|
+
.into('role_screens', ['role_id', 'screen_id'])
|
18
|
+
.values({
|
19
|
+
role_id: 1,
|
20
|
+
screen_id: screen.id,
|
21
|
+
})
|
22
|
+
.execute();
|
23
|
+
}
|
24
|
+
*/
|
25
|
+
}
|
26
|
+
async down(queryRunner) {
|
27
|
+
await queryRunner.manager.delete('role_screens', { role_id: 1 });
|
28
|
+
}
|
29
|
+
}
|
30
|
+
exports.Migrate = Migrate;
|
31
|
+
//# sourceMappingURL=migrate-17.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-17.js","sourceRoot":"","sources":["../../src/__migrations/migrate-17.ts"],"names":[],"mappings":";;;AAEA,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B;;;;;;;;;;;;;;;;;;cAkBM;IACR,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IACnE,CAAC;CACF;AA1BD,0BA0BC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-18.d.ts","sourceRoot":"","sources":["../../src/__migrations/migrate-18.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,OAAQ,YAAW,kBAAkB;IAC1C,EAAE,CAAC,WAAW,EAAE,WAAW;IA+B3B,IAAI,CAAC,WAAW,EAAE,WAAW;CAIpC"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Migrate = void 0;
|
4
|
+
class Migrate {
|
5
|
+
async up(queryRunner) {
|
6
|
+
/*
|
7
|
+
const menus = await queryRunner.manager
|
8
|
+
.createQueryBuilder()
|
9
|
+
.select()
|
10
|
+
.from('menus', 'm')
|
11
|
+
.execute();
|
12
|
+
|
13
|
+
await queryRunner.manager
|
14
|
+
.createQueryBuilder()
|
15
|
+
.insert()
|
16
|
+
.into('role_menus', ['role_id', 'menu_id'])
|
17
|
+
.values(
|
18
|
+
menus.map((menu) => ({
|
19
|
+
role_id: 1,
|
20
|
+
menu_id: menu.id,
|
21
|
+
})),
|
22
|
+
)
|
23
|
+
.execute();
|
24
|
+
|
25
|
+
await queryRunner.manager
|
26
|
+
.createQueryBuilder()
|
27
|
+
.insert()
|
28
|
+
.into('role_menus', ['role_id', 'menu_id'])
|
29
|
+
.values({
|
30
|
+
role_id: 2,
|
31
|
+
menu_id: 1,
|
32
|
+
});
|
33
|
+
*/
|
34
|
+
}
|
35
|
+
async down(queryRunner) {
|
36
|
+
await queryRunner.manager.delete('role_menus', { role_id: 1 });
|
37
|
+
await queryRunner.manager.delete('role_menus', { role_id: 2 });
|
38
|
+
}
|
39
|
+
}
|
40
|
+
exports.Migrate = Migrate;
|
41
|
+
//# sourceMappingURL=migrate-18.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"migrate-18.js","sourceRoot":"","sources":["../../src/__migrations/migrate-18.ts"],"names":[],"mappings":";;;AAEA,MAAa,OAAO;IAClB,KAAK,CAAC,EAAE,CAAC,WAAwB;QAC/B;;;;;;;;;;;;;;;;;;;;;;;;;;;YA2BI;IACN,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,WAAwB;QACjC,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAC/D,MAAM,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IACjE,CAAC;CACF;AApCD,0BAoCC"}
|