q-koa 11.8.3 → 11.8.5
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.
|
@@ -3,13 +3,21 @@ module.exports = {
|
|
|
3
3
|
belongs: 'page',
|
|
4
4
|
multiple: false,
|
|
5
5
|
availableSort: false,
|
|
6
|
-
order: [
|
|
7
|
-
select: [{
|
|
6
|
+
order: ['created_at'],
|
|
7
|
+
select: [{ key: 'user_id' }, { key: 'nick_name' }],
|
|
8
8
|
excludes: [],
|
|
9
9
|
limit: 20,
|
|
10
10
|
defaultOrder: [{ sort: 'descending', type: 'id' }],
|
|
11
|
-
comment: {
|
|
11
|
+
comment: { created_at: '创建时间' },
|
|
12
12
|
sortOrder: 1,
|
|
13
13
|
reference: [],
|
|
14
14
|
excludeAuth: [],
|
|
15
|
+
indexList: [
|
|
16
|
+
{
|
|
17
|
+
name: 'openid',
|
|
18
|
+
unique: true,
|
|
19
|
+
fields: ['openid'],
|
|
20
|
+
},
|
|
21
|
+
{ fields: ['user_id'] },
|
|
22
|
+
],
|
|
15
23
|
}
|
|
@@ -731,7 +731,7 @@ exports.checkIndex = async (ctx) => {
|
|
|
731
731
|
...res,
|
|
732
732
|
[current]: {
|
|
733
733
|
isSame,
|
|
734
|
-
tableIndexList,
|
|
734
|
+
indexList: tableIndexList.filter((i) => i.name !== 'PRIMARY'),
|
|
735
735
|
},
|
|
736
736
|
}
|
|
737
737
|
}
|
|
@@ -751,7 +751,9 @@ exports.checkIndex = async (ctx) => {
|
|
|
751
751
|
const isSame = compareIndex(tableIndexList, modelIndexList, model)
|
|
752
752
|
return ctx.SUCCESS({
|
|
753
753
|
isSame,
|
|
754
|
-
...(isSame
|
|
754
|
+
...(isSame
|
|
755
|
+
? {}
|
|
756
|
+
: { indexList: tableIndexList.filter((i) => i.name !== 'PRIMARY') }),
|
|
755
757
|
})
|
|
756
758
|
}
|
|
757
759
|
}
|