mysqlsyncr 1.0.74 → 1.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -3293,6 +3293,13 @@ var findDifferences = function findDifferences(expected, current) {
3293
3293
  if (field.Type !== currentField.Type) {
3294
3294
  if (field.Type == 'int' && currentField.Type == 'int(11)') return 0; // continue
3295
3295
  // int(11) is the default for int and used on older versions of mysql
3296
+ if (field.Type == 'smallint' && currentField.Type.startsWith('smallint(')) return 0; // continue
3297
+ // smallint(6) is the default for smallint and used on older versions of mysql
3298
+ if (field.Type == 'tinyint' && currentField.Type.startsWith('tinyint(')) return 0; // continue
3299
+ // tinyint(1) is the default for tinyint and used on older versions of mysql
3300
+ if (field.Type == 'varchar' && currentField.Type.startsWith('varchar(')) return 0; // continue
3301
+ // varchar(255) is the default for varchar and used on older versions of mysql
3302
+
3296
3303
  differences.push({
3297
3304
  type: 'mismatched_field',
3298
3305
  info: "Type",
package/dist/index.js CHANGED
@@ -3290,6 +3290,13 @@ var findDifferences = function findDifferences(expected, current) {
3290
3290
  if (field.Type !== currentField.Type) {
3291
3291
  if (field.Type == 'int' && currentField.Type == 'int(11)') return 0; // continue
3292
3292
  // int(11) is the default for int and used on older versions of mysql
3293
+ if (field.Type == 'smallint' && currentField.Type.startsWith('smallint(')) return 0; // continue
3294
+ // smallint(6) is the default for smallint and used on older versions of mysql
3295
+ if (field.Type == 'tinyint' && currentField.Type.startsWith('tinyint(')) return 0; // continue
3296
+ // tinyint(1) is the default for tinyint and used on older versions of mysql
3297
+ if (field.Type == 'varchar' && currentField.Type.startsWith('varchar(')) return 0; // continue
3298
+ // varchar(255) is the default for varchar and used on older versions of mysql
3299
+
3293
3300
  differences.push({
3294
3301
  type: 'mismatched_field',
3295
3302
  info: "Type",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mysqlsyncr",
3
- "version": "1.0.74",
3
+ "version": "1.0.76",
4
4
  "description": "",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -71,6 +71,10 @@ export const findDifferences = (expected, current) => {
71
71
  }
72
72
  if (field.Type !== currentField.Type) {
73
73
  if(field.Type == 'int' && currentField.Type == 'int(11)') continue; // int(11) is the default for int and used on older versions of mysql
74
+ if(field.Type == 'smallint' && currentField.Type.startsWith('smallint(')) continue; // smallint(6) is the default for smallint and used on older versions of mysql
75
+ if(field.Type == 'tinyint' && currentField.Type.startsWith('tinyint(')) continue; // tinyint(1) is the default for tinyint and used on older versions of mysql
76
+ if(field.Type == 'varchar' && currentField.Type.startsWith('varchar(')) continue; // varchar(255) is the default for varchar and used on older versions of mysql
77
+
74
78
  differences.push({ type: 'mismatched_field', info: "Type", tableName, field, currentField });
75
79
  }
76
80
  }