@hedhog/admin 0.0.45 → 0.0.46

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hedhog/admin",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -226,7 +226,7 @@ export class Migrate implements MigrationInterface {
226
226
  name: 'locales',
227
227
  columns: [
228
228
  idColumn(),
229
- foreignColumn('country_id'),
229
+ foreignColumn({ name: 'country_id' }),
230
230
  {
231
231
  name: 'code',
232
232
  type: 'char',
@@ -296,10 +296,9 @@ export class Migrate implements MigrationInterface {
296
296
  region: locales[index].region,
297
297
  country_id: locales[index].country_id,
298
298
  })
299
- .returning('id')
300
299
  .execute();
301
300
 
302
- locales[index].id = localeId.raw[0].id;
301
+ locales[index].id = localeId.raw.insertId;
303
302
  }
304
303
  }
305
304
 
@@ -37,8 +37,8 @@ export class Migrate implements MigrationInterface {
37
37
  name: 'translations',
38
38
  columns: [
39
39
  idColumn(),
40
- foreignColumn('locale_id'),
41
- foreignColumn('namespace_id'),
40
+ foreignColumn({ name: 'locale_id' }),
41
+ foreignColumn({ name: 'namespace_id' }),
42
42
  {
43
43
  name: 'name',
44
44
  type: 'varchar',
@@ -21,8 +21,8 @@ export class Migrate implements MigrationInterface {
21
21
  new Table({
22
22
  name: 'multifactor_translations',
23
23
  columns: [
24
- foreignColumn('multifactor_id', true),
25
- foreignColumn('locale_id', true),
24
+ foreignColumn({ name: 'multifactor_id', isPrimary: true }),
25
+ foreignColumn({ name: 'locale_id', isPrimary: true }),
26
26
  {
27
27
  name: 'name',
28
28
  type: 'varchar',
@@ -95,7 +95,7 @@ export class Migrate implements MigrationInterface {
95
95
  name: 'users',
96
96
  columns: [
97
97
  idColumn(),
98
- foreignColumn('multifactor_id'),
98
+ foreignColumn({ name: 'multifactor_id', isNullable: true }),
99
99
  {
100
100
  name: 'name',
101
101
  type: 'varchar',
@@ -34,8 +34,8 @@ export class Migrate implements MigrationInterface {
34
34
  new Table({
35
35
  name: 'screen_translations',
36
36
  columns: [
37
- foreignColumn('screen_id', true),
38
- foreignColumn('locale_id', true),
37
+ foreignColumn({ name: 'screen_id', isPrimary: true }),
38
+ foreignColumn({ name: 'locale_id', isPrimary: true }),
39
39
  {
40
40
  name: 'name',
41
41
  type: 'varchar',
@@ -13,7 +13,7 @@ export class Migrate implements MigrationInterface {
13
13
  name: 'menus',
14
14
  columns: [
15
15
  idColumn(),
16
- foreignColumn('menu_id'),
16
+ foreignColumn({ name: 'menu_id' }),
17
17
  {
18
18
  name: 'url',
19
19
  type: 'varchar',
@@ -80,8 +80,8 @@ export class Migrate implements MigrationInterface {
80
80
  new Table({
81
81
  name: 'menu_screens',
82
82
  columns: [
83
- foreignColumn('menu_id', true),
84
- foreignColumn('screen_id', true),
83
+ foreignColumn({ name: 'menu_id', isPrimary: true }),
84
+ foreignColumn({ name: 'screen_id', isPrimary: true }),
85
85
  ],
86
86
  }),
87
87
  );
@@ -19,8 +19,8 @@ export class Migrate implements MigrationInterface {
19
19
  new Table({
20
20
  name: 'role_translations',
21
21
  columns: [
22
- foreignColumn('role_id', true),
23
- foreignColumn('locale_id', true),
22
+ foreignColumn({ name: 'role_id', isPrimary: true }),
23
+ foreignColumn({ name: 'locale_id', isPrimary: true }),
24
24
  {
25
25
  name: 'name',
26
26
  type: 'varchar',
@@ -12,8 +12,8 @@ export class Migrate implements MigrationInterface {
12
12
  new Table({
13
13
  name: 'role_menus',
14
14
  columns: [
15
- foreignColumn('role_id', true),
16
- foreignColumn('menu_id', true),
15
+ foreignColumn({ name: 'role_id', isPrimary: true }),
16
+ foreignColumn({ name: 'menu_id', isPrimary: true }),
17
17
  timestampColumn(),
18
18
  timestampColumn('updated_at'),
19
19
  ],
@@ -12,8 +12,8 @@ export class Migrate implements MigrationInterface {
12
12
  new Table({
13
13
  name: 'route_screens',
14
14
  columns: [
15
- foreignColumn('route_id', true),
16
- foreignColumn('screen_id', true),
15
+ foreignColumn({ name: 'route_id', isPrimary: true }),
16
+ foreignColumn({ name: 'screen_id', isPrimary: true }),
17
17
  timestampColumn(),
18
18
  timestampColumn('updated_at'),
19
19
  ],
@@ -12,8 +12,8 @@ export class Migrate implements MigrationInterface {
12
12
  new Table({
13
13
  name: 'role_screens',
14
14
  columns: [
15
- foreignColumn('role_id', true),
16
- foreignColumn('screen_id', true),
15
+ foreignColumn({ name: 'role_id', isPrimary: true }),
16
+ foreignColumn({ name: 'screen_id', isPrimary: true }),
17
17
  timestampColumn(),
18
18
  timestampColumn('updated_at'),
19
19
  ],
@@ -12,8 +12,8 @@ export class Migrate implements MigrationInterface {
12
12
  new Table({
13
13
  name: 'role_users',
14
14
  columns: [
15
- foreignColumn('role_id', true),
16
- foreignColumn('user_id', true),
15
+ foreignColumn({ name: 'role_id', isPrimary: true }),
16
+ foreignColumn({ name: 'user_id', isPrimary: true }),
17
17
  timestampColumn(),
18
18
  timestampColumn('updated_at'),
19
19
  ],
@@ -12,8 +12,8 @@ export class Migrate implements MigrationInterface {
12
12
  new Table({
13
13
  name: 'role_routes',
14
14
  columns: [
15
- foreignColumn('role_id', true),
16
- foreignColumn('route_id', true),
15
+ foreignColumn({ name: 'role_id', isPrimary: true }),
16
+ foreignColumn({ name: 'route_id', isPrimary: true }),
17
17
  timestampColumn(),
18
18
  timestampColumn('updated_at'),
19
19
  ],
@@ -28,8 +28,8 @@ export class Migrate implements MigrationInterface {
28
28
  new Table({
29
29
  name: 'setting_group_translations',
30
30
  columns: [
31
- foreignColumn('locale_id', true),
32
- foreignColumn('group_id', true),
31
+ foreignColumn({ name: 'locale_id', isPrimary: true }),
32
+ foreignColumn({ name: 'group_id', isPrimary: true }),
33
33
  {
34
34
  name: 'name',
35
35
  type: 'varchar',
@@ -66,7 +66,7 @@ export class Migrate implements MigrationInterface {
66
66
  name: 'settings',
67
67
  columns: [
68
68
  idColumn(),
69
- foreignColumn('group_id'),
69
+ foreignColumn({ name: 'group_id' }),
70
70
  {
71
71
  name: 'slug',
72
72
  type: 'varchar',
@@ -108,8 +108,8 @@ export class Migrate implements MigrationInterface {
108
108
  new Table({
109
109
  name: 'setting_translations',
110
110
  columns: [
111
- foreignColumn('locale_id', true),
112
- foreignColumn('setting_id', true),
111
+ foreignColumn({ name: 'locale_id', isPrimary: true }),
112
+ foreignColumn({ name: 'setting_id', isPrimary: true }),
113
113
  {
114
114
  name: 'description',
115
115
  type: 'varchar',
@@ -146,8 +146,8 @@ export class Migrate implements MigrationInterface {
146
146
  new Table({
147
147
  name: 'setting_users',
148
148
  columns: [
149
- foreignColumn('user_id', true),
150
- foreignColumn('setting_id', true),
149
+ foreignColumn({ name: 'user_id', isPrimary: true }),
150
+ foreignColumn({ name: 'setting_id', isPrimary: true }),
151
151
  {
152
152
  name: 'value',
153
153
  type: 'varchar',