I am unable to get my kotlin schema to match my atlas device sync schema no matter what I do.
I have copied the sync model directly out of atlas and it is still giving me the following error: [Logic][InvalidSchemaChange(2019)] Invalid schema change (UPLOAD): non-breaking schema change: adding schema for Realm table “items”, schema changes from clients are restricted when developer mode is disabled Logs:
My class: class items:
RealmObject {
@PrimaryKey
var _id: ObjectId = ObjectId()
var active: Boolean = false
var basePrice: Decimal128 = Decimal128("0")
var caseCost: Decimal128 = Decimal128("0")
var caseCount: Long = 0
var category: String = ""
@FullText
var department: String = ""
var description: String = ""
var ebtItem: Boolean = false
var scaleItem: Boolean = false
var tenant: String = ""
var upc: String = ""
var wicItem: Boolean = false
}
I have also tried:
class item : RealmObject {
@PrimaryKey
var _id: ObjectId = ObjectId()
var active: Boolean = false
var basePrice: Decimal128 = Decimal128("0")
var caseCost: Decimal128 = Decimal128("0")
var caseCount: Long = 0
var category: String = ""
var department: String = ""
var description: String = ""
var ebtItem: Boolean = false
var scaleItem: Boolean = false
var tenant: String = ""
var upc: String = ""
var wicItem: Boolean = false
}
The schema in device sync is:
{
"title": "item",
"properties": {
"_id": {
"bsonType": "objectId"
},
"active": {
"bsonType": "bool"
},
"basePrice": {
"bsonType": "decimal"
},
"caseCost": {
"bsonType": "decimal"
},
"caseCount": {
"bsonType": "long"
},
"category": {
"bsonType": "string"
},
"department": {
"bsonType": "string"
},
"description": {
"bsonType": "string"
},
"ebtItem": {
"bsonType": "bool"
},
"scaleItem": {
"bsonType": "bool"
},
"tenant": {
"bsonType": "string"
},
"upc": {
"bsonType": "string"
},
"wicItem": {
"bsonType": "bool"
}
},
"required": [
"_id",
"active",
"basePrice",
"caseCost",
"caseCount",
"category",
"department",
"description",
"ebtItem",
"scaleItem",
"tenant",
"upc",
"wicItem"
]
}
What can I do to use this device sync collection in Android?