@@ -344,8 +344,8 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
344
344
collectionId,
345
345
key: attribute.key,
346
346
required: attribute.required,
347
- min: attribute.min,
348
- max: attribute.max,
347
+ min: parseInt( attribute.min.toString()) ,
348
+ max: parseInt( attribute.max.toString()) ,
349
349
xdefault: attribute.default,
350
350
array: attribute.array,
351
351
parseOutput: false
@@ -356,8 +356,8 @@ const createAttribute = async (databaseId, collectionId, attribute) => {
356
356
collectionId,
357
357
key: attribute.key,
358
358
required: attribute.required,
359
- min: attribute.min,
360
- max: attribute.max,
359
+ min: parseFloat( attribute.min.toString()) ,
360
+ max: parseFloat( attribute.max.toString()) ,
361
361
xdefault: attribute.default,
362
362
array: attribute.array,
363
363
parseOutput: false
@@ -481,7 +481,14 @@ const attributesToCreate = async (remoteAttributes, localAttributes, collection)
481
481
return { Key: change.key, Action: change.action, Reason: change.reason, };
482
482
}));
483
483
484
- if (!cliConfig.force) {
484
+ if (!cliConfig.force && (deleting.length > 0 || conflicts.length > 0)) {
485
+ if (deleting.length > 0) {
486
+ log(`Attribute deletion will cause ${chalk.red('loss of data')}`);
487
+ }
488
+ if (conflicts.length > 0) {
489
+ log(`Attribute recreation will cause ${chalk.red('loss of data')}`);
490
+ }
491
+
485
492
const answers = await inquirer.prompt(questionsPushCollections[1]);
486
493
487
494
if (answers.changes.toLowerCase() !== 'yes') {
@@ -1045,7 +1052,7 @@ const pushCollection = async ({ returnOnZero } = { returnOnZero: false }) => {
1045
1052
}
1046
1053
}))
1047
1054
1048
- // Serialize attribute actions
1055
+ // Serialize attribute actions
1049
1056
for (let collection of collections) {
1050
1057
let attributes = collection.attributes;
1051
1058
0 commit comments