@hedhog/admin 0.0.48 → 0.0.50

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.48",
3
+ "version": "0.0.50",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -52,9 +52,10 @@ export class Migrate implements MigrationInterface {
52
52
  timestampColumn(),
53
53
  timestampColumn('updated_at'),
54
54
  ],
55
- uniques: [
55
+ indices: [
56
56
  {
57
57
  columnNames: ['locale_id', 'namespace_id', 'name'],
58
+ isUnique: true,
58
59
  },
59
60
  ],
60
61
  foreignKeys: [
@@ -17,6 +17,7 @@ export class Migrate implements MigrationInterface {
17
17
  {
18
18
  name: 'slug',
19
19
  type: 'varchar',
20
+ isUnique: true,
20
21
  },
21
22
  {
22
23
  name: 'url',
@@ -37,7 +38,7 @@ export class Migrate implements MigrationInterface {
37
38
  timestampColumn(),
38
39
  timestampColumn('updated_at'),
39
40
  ],
40
- uniques: [{ columnNames: ['slug'] }],
41
+ indices: [{ columnNames: ['slug'], isUnique: true }],
41
42
  }),
42
43
  );
43
44
 
@@ -21,14 +21,12 @@ export class Migrate implements MigrationInterface {
21
21
  timestampColumn(),
22
22
  timestampColumn('updated_at'),
23
23
  ],
24
- }),
25
- );
26
-
27
- await queryRunner.createUniqueConstraint(
28
- 'routes',
29
- new TableUnique({
30
- columnNames: ['url', 'method'],
31
- name: 'unique_routes',
24
+ indices: [
25
+ {
26
+ columnNames: ['url', 'method'],
27
+ isUnique: true,
28
+ },
29
+ ],
32
30
  }),
33
31
  );
34
32
 
@@ -17,6 +17,7 @@ export class Migrate implements MigrationInterface {
17
17
  name: 'slug',
18
18
  type: 'varchar',
19
19
  length: '63',
20
+ isUnique: true,
20
21
  },
21
22
  timestampColumn(),
22
23
  timestampColumn('updated_at'),