Closed AndresMorelos closed 3 years ago
Replace in the User Model
in the categories property from:
{
type: mongoose.Types.ObjectId,
ref: CategoryModel,
autopopulate: true
}
To:
{
label: String,
budget: {
value: {
type: Number,
default: 0
},
current: {
type: Number,
default: 0
},
progress: {
type: Number,
default: 0
}
},
value: String,
type: {
type: String,
index: false,
required: true,
trim: true,
enum: ['INCOME', 'EXPENSE']
}
}
node ./devultis/migrationCategories/migrateCategories.js
User Model
node ./devultis/migrationCategories/updateCategories.js
Replace for Payment and Income Models
category property from:
{
type: String,
default: null
}
To:
{
type: mongoose.Types.ObjectId,
ref: CategoryModel,
autopopulate: true
}
node ./devultis/migrationCategories/updatePaymentIncomesCategories.js
Will fix #72
ScreenShots
Add
Delete
Update