mysqlsyncr 1.0.74 → 1.0.78
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 +8 -0
- package/dist/index.js +8 -0
- package/package.json +1 -1
- package/src/differences.js +4 -0
package/dist/index.cjs
CHANGED
|
@@ -3293,6 +3293,14 @@ 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
|
+
if (field.Type == 'bigint' && currentField.Type.startsWith('bigint(')) return 0; // continue
|
|
3303
|
+
// bigint(20) is the default for bigint and used on older versions of mysql
|
|
3296
3304
|
differences.push({
|
|
3297
3305
|
type: 'mismatched_field',
|
|
3298
3306
|
info: "Type",
|
package/dist/index.js
CHANGED
|
@@ -3290,6 +3290,14 @@ 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
|
+
if (field.Type == 'bigint' && currentField.Type.startsWith('bigint(')) return 0; // continue
|
|
3300
|
+
// bigint(20) is the default for bigint and used on older versions of mysql
|
|
3293
3301
|
differences.push({
|
|
3294
3302
|
type: 'mismatched_field',
|
|
3295
3303
|
info: "Type",
|
package/package.json
CHANGED
package/src/differences.js
CHANGED
|
@@ -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
|
+
if(field.Type == 'bigint' && currentField.Type.startsWith('bigint(')) continue; // bigint(20) is the default for bigint and used on older versions of mysql
|
|
74
78
|
differences.push({ type: 'mismatched_field', info: "Type", tableName, field, currentField });
|
|
75
79
|
}
|
|
76
80
|
}
|