- Fix Import from Trello error 400.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2018-08-14 01:28:53 +03:00
parent be25e372a3
commit 2f557ae3a5
2 changed files with 26 additions and 0 deletions

4
config/models.js Normal file
View file

@ -0,0 +1,4 @@
module.exports.models = {
connection: 'mongodb',
migrate: 'safe'
}

View file

@ -6,6 +6,8 @@ Cards = new Mongo.Collection('cards');
Cards.attachSchema(new SimpleSchema({
title: {
type: String,
optional: true,
defaultValue: '',
},
archived: {
type: Boolean,
@ -22,6 +24,8 @@ Cards.attachSchema(new SimpleSchema({
},
listId: {
type: String,
optional: true,
defaultValue: '',
},
swimlaneId: {
type: String,
@ -31,10 +35,14 @@ Cards.attachSchema(new SimpleSchema({
// difficult to manage and less efficient.
boardId: {
type: String,
optional: true,
defaultValue: '',
},
coverId: {
type: String,
optional: true,
defaultValue: '',
},
createdAt: {
type: Date,
@ -49,15 +57,19 @@ Cards.attachSchema(new SimpleSchema({
customFields: {
type: [Object],
optional: true,
defaultValue: [],
},
'customFields.$': {
type: new SimpleSchema({
_id: {
type: String,
optional: true,
defaultValue: '',
},
value: {
type: Match.OneOf(String, Number, Boolean, Date),
optional: true,
defaultValue: '',
},
}),
},
@ -70,22 +82,28 @@ Cards.attachSchema(new SimpleSchema({
description: {
type: String,
optional: true,
defaultValue: ''
},
requestedBy: {
type: String,
optional: true,
defaultValue: '',
},
assignedBy: {
type: String,
optional: true,
defaultValue: '',
},
labelIds: {
type: [String],
optional: true,
defaultValue: '',
},
members: {
type: [String],
optional: true,
defaultValue: [],
},
receivedAt: {
type: Date,
@ -107,6 +125,7 @@ Cards.attachSchema(new SimpleSchema({
type: Number,
decimal: true,
optional: true,
defaultValue: 0,
},
isOvertime: {
type: Boolean,
@ -126,6 +145,7 @@ Cards.attachSchema(new SimpleSchema({
sort: {
type: Number,
decimal: true,
defaultValue: '',
},
subtaskSort: {
type: Number,
@ -135,10 +155,12 @@ Cards.attachSchema(new SimpleSchema({
},
type: {
type: String,
defaultValue: '',
},
linkedId: {
type: String,
optional: true,
defaultValue: '',
},
}));