@hedhog/admin 0.0.70 → 0.0.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hedhog.yaml +0 -6
- package/package.json +1 -1
- package/src/migrations/migrate-01.ts +22 -31
- package/src/migrations/migrate-03.ts +0 -1
package/hedhog.yaml
CHANGED
@@ -1031,14 +1031,8 @@ data:
|
|
1031
1031
|
locales:
|
1032
1032
|
- code: en
|
1033
1033
|
region: US
|
1034
|
-
country_id:
|
1035
|
-
where:
|
1036
|
-
code: USA
|
1037
1034
|
- code: pt
|
1038
1035
|
region: BR
|
1039
|
-
country_id:
|
1040
|
-
where:
|
1041
|
-
code: BRA
|
1042
1036
|
translation_namespaces:
|
1043
1037
|
- name: translation
|
1044
1038
|
relations:
|
package/package.json
CHANGED
@@ -21,42 +21,11 @@ export class Migrate implements MigrationInterface {
|
|
21
21
|
true,
|
22
22
|
);
|
23
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
|
-
|
54
24
|
await queryRunner.createTable(
|
55
25
|
new Table({
|
56
26
|
name: 'locales',
|
57
27
|
columns: [
|
58
28
|
idColumn(),
|
59
|
-
foreignColumn({ name: 'country_id' }),
|
60
29
|
{
|
61
30
|
name: 'code',
|
62
31
|
type: 'char',
|
@@ -77,6 +46,22 @@ export class Migrate implements MigrationInterface {
|
|
77
46
|
timestampColumn(),
|
78
47
|
timestampColumn('updated_at'),
|
79
48
|
],
|
49
|
+
}),
|
50
|
+
);
|
51
|
+
|
52
|
+
await queryRunner.createTable(
|
53
|
+
new Table({
|
54
|
+
name: 'country_translations',
|
55
|
+
columns: [
|
56
|
+
foreignColumn({ name: 'country_id', isPrimary: true }),
|
57
|
+
foreignColumn({ name: 'locale_id', isPrimary: true }),
|
58
|
+
{
|
59
|
+
name: 'name',
|
60
|
+
type: 'varchar',
|
61
|
+
},
|
62
|
+
timestampColumn(),
|
63
|
+
timestampColumn('updated_at'),
|
64
|
+
],
|
80
65
|
foreignKeys: [
|
81
66
|
{
|
82
67
|
columnNames: ['country_id'],
|
@@ -84,6 +69,12 @@ export class Migrate implements MigrationInterface {
|
|
84
69
|
referencedTableName: 'countries',
|
85
70
|
onDelete: 'CASCADE',
|
86
71
|
},
|
72
|
+
{
|
73
|
+
columnNames: ['locale_id'],
|
74
|
+
referencedColumnNames: ['id'],
|
75
|
+
referencedTableName: 'locales',
|
76
|
+
onDelete: 'CASCADE',
|
77
|
+
},
|
87
78
|
],
|
88
79
|
}),
|
89
80
|
);
|