@hedhog/admin 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -47,6 +47,39 @@ export class Migrate implements MigrationInterface {
|
|
47
47
|
}),
|
48
48
|
]);
|
49
49
|
|
50
|
+
await queryRunner.manager
|
51
|
+
.createQueryBuilder()
|
52
|
+
.insert()
|
53
|
+
.into('screens', ['name', 'slug', 'description', 'icon'])
|
54
|
+
.values([
|
55
|
+
{
|
56
|
+
name: 'Users',
|
57
|
+
slug: '/management/users',
|
58
|
+
description: 'Check all users registered in the system.',
|
59
|
+
icon: 'users',
|
60
|
+
},
|
61
|
+
{
|
62
|
+
name: 'Roles',
|
63
|
+
slug: '/management/roles',
|
64
|
+
description: 'Check all roles registered in the system.',
|
65
|
+
icon: 'circles',
|
66
|
+
},
|
67
|
+
{
|
68
|
+
name: 'Screens',
|
69
|
+
slug: '/management/screens',
|
70
|
+
description: 'Check all screens registered in the system.',
|
71
|
+
icon: 'monitor',
|
72
|
+
},
|
73
|
+
{
|
74
|
+
name: 'Menus',
|
75
|
+
slug: '/management/menus',
|
76
|
+
description: 'Check all menus registered in the system.',
|
77
|
+
icon: 'menu',
|
78
|
+
},
|
79
|
+
])
|
80
|
+
.returning('id')
|
81
|
+
.execute();
|
82
|
+
|
50
83
|
const screenIdScreen = await queryRunner.manager
|
51
84
|
.createQueryBuilder()
|
52
85
|
.select()
|
@@ -4,35 +4,8 @@ export class Migrate implements MigrationInterface {
|
|
4
4
|
async up(queryRunner: QueryRunner) {
|
5
5
|
const screens = await queryRunner.manager
|
6
6
|
.createQueryBuilder()
|
7
|
-
.
|
8
|
-
.
|
9
|
-
.values([
|
10
|
-
{
|
11
|
-
name: 'Users',
|
12
|
-
slug: '/management/users',
|
13
|
-
description: 'Check all users registered in the system.',
|
14
|
-
icon: 'users',
|
15
|
-
},
|
16
|
-
{
|
17
|
-
name: 'Roles',
|
18
|
-
slug: '/management/roles',
|
19
|
-
description: 'Check all roles registered in the system.',
|
20
|
-
icon: 'circles',
|
21
|
-
},
|
22
|
-
{
|
23
|
-
name: 'Screens',
|
24
|
-
slug: '/management/screens',
|
25
|
-
description: 'Check all screens registered in the system.',
|
26
|
-
icon: 'monitor',
|
27
|
-
},
|
28
|
-
{
|
29
|
-
name: 'Menus',
|
30
|
-
slug: '/management/menus',
|
31
|
-
description: 'Check all menus registered in the system.',
|
32
|
-
icon: 'menu',
|
33
|
-
},
|
34
|
-
])
|
35
|
-
.returning('id')
|
7
|
+
.select()
|
8
|
+
.from('screens', 's')
|
36
9
|
.execute();
|
37
10
|
|
38
11
|
for (const screen of screens.raw) {
|
@@ -49,7 +22,6 @@ export class Migrate implements MigrationInterface {
|
|
49
22
|
}
|
50
23
|
|
51
24
|
async down(queryRunner: QueryRunner) {
|
52
|
-
await queryRunner.dropTable('screens');
|
53
25
|
await queryRunner.dropTable('role_screens');
|
54
26
|
}
|
55
27
|
}
|