@hedhog/admin 0.0.68 → 0.0.70

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.68",
3
+ "version": "0.0.70",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -8,12 +8,6 @@ export class Migrate implements MigrationInterface {
8
8
  name: 'countries',
9
9
  columns: [
10
10
  idColumn(),
11
- {
12
- name: 'name',
13
- type: 'varchar',
14
- length: '50',
15
- isNullable: false,
16
- },
17
11
  {
18
12
  name: 'code',
19
13
  type: 'char',
@@ -27,6 +21,36 @@ export class Migrate implements MigrationInterface {
27
21
  true,
28
22
  );
29
23
 
24
+ await queryRunner.createTable(
25
+ new Table({
26
+ name: 'country_translations',
27
+ columns: [
28
+ foreignColumn({ name: 'country_id', isPrimary: true }),
29
+ foreignColumn({ name: 'locale_id', isPrimary: true }),
30
+ {
31
+ name: 'name',
32
+ type: 'varchar',
33
+ },
34
+ timestampColumn(),
35
+ timestampColumn('updated_at'),
36
+ ],
37
+ foreignKeys: [
38
+ {
39
+ columnNames: ['country_id'],
40
+ referencedColumnNames: ['id'],
41
+ referencedTableName: 'countries',
42
+ onDelete: 'CASCADE',
43
+ },
44
+ {
45
+ columnNames: ['locale_id'],
46
+ referencedColumnNames: ['id'],
47
+ referencedTableName: 'locales',
48
+ onDelete: 'CASCADE',
49
+ },
50
+ ],
51
+ }),
52
+ );
53
+
30
54
  await queryRunner.createTable(
31
55
  new Table({
32
56
  name: 'locales',