Skip to content

Commit fab8cfd

Browse files
JeremyPleasedrew-gross
authored andcommitted
Add additional default fields to _Installation class (#1852)
Fields are appVersion, appName, appIdentifier, and parseVersion. These fields are sent by Android and iOS SDKs.
1 parent 9bad879 commit fab8cfd

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

spec/MongoSchemaCollectionAdapter.spec.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ describe('MongoSchemaCollection', () => {
2828
"deviceType":"string",
2929
"channels":"array",
3030
"user":"*_User",
31+
"pushType":"string",
32+
"GCMSenderId":"string",
33+
"timeZone":"string",
34+
"localeIdentifier":"string",
35+
"badge":"number",
36+
"appVersion":"string",
37+
"appName":"string",
38+
"appIdentifier":"string",
39+
"parseVersion":"string",
3140
})).toEqual({
3241
className: '_Installation',
3342
fields: {
@@ -36,6 +45,15 @@ describe('MongoSchemaCollection', () => {
3645
deviceType: { type: 'String' },
3746
channels: { type: 'Array' },
3847
user: { type: 'Pointer', targetClass: '_User' },
48+
pushType: { type: 'String' },
49+
GCMSenderId: { type: 'String' },
50+
timeZone: { type: 'String' },
51+
localeIdentifier: { type: 'String' },
52+
badge: { type: 'Number' },
53+
appVersion: { type: 'String' },
54+
appName: { type: 'String' },
55+
appIdentifier: { type: 'String' },
56+
parseVersion: { type: 'String' },
3957
ACL: { type: 'ACL' },
4058
createdAt: { type: 'Date' },
4159
updatedAt: { type: 'Date' },

spec/Schema.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@ describe('SchemaController', () => {
453453
timeZone: { type: 'String' },
454454
localeIdentifier: { type: 'String' },
455455
badge: { type: 'Number' },
456+
appVersion: { type: 'String' },
457+
appName: { type: 'String' },
458+
appIdentifier: { type: 'String' },
459+
parseVersion: { type: 'String' },
456460
},
457461
classLevelPermissions: {
458462
find: { '*': true },

src/Controllers/SchemaController.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const defaultColumns = Object.freeze({
3333
"email": {type:'String'},
3434
"emailVerified": {type:'Boolean'},
3535
},
36-
// The additional default columns for the _User collection (in addition to DefaultCols)
36+
// The additional default columns for the _Installation collection (in addition to DefaultCols)
3737
_Installation: {
3838
"installationId": {type:'String'},
3939
"deviceToken": {type:'String'},
@@ -43,15 +43,19 @@ const defaultColumns = Object.freeze({
4343
"GCMSenderId": {type:'String'},
4444
"timeZone": {type:'String'},
4545
"localeIdentifier": {type:'String'},
46-
"badge": {type:'Number'}
46+
"badge": {type:'Number'},
47+
"appVersion": {type:'String'},
48+
"appName": {type:'String'},
49+
"appIdentifier": {type:'String'},
50+
"parseVersion": {type:'String'},
4751
},
48-
// The additional default columns for the _User collection (in addition to DefaultCols)
52+
// The additional default columns for the _Role collection (in addition to DefaultCols)
4953
_Role: {
5054
"name": {type:'String'},
5155
"users": {type:'Relation', targetClass:'_User'},
5256
"roles": {type:'Relation', targetClass:'_Role'}
5357
},
54-
// The additional default columns for the _User collection (in addition to DefaultCols)
58+
// The additional default columns for the _Session collection (in addition to DefaultCols)
5559
_Session: {
5660
"restricted": {type:'Boolean'},
5761
"user": {type:'Pointer', targetClass:'_User'},

0 commit comments

Comments
 (0)