mysqlsyncr 1.0.76 → 1.0.80
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 +3 -2
- package/dist/index.js +3 -2
- package/package.json +1 -1
- package/src/differences.js +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3291,7 +3291,7 @@ var findDifferences = function findDifferences(expected, current) {
|
|
|
3291
3291
|
});
|
|
3292
3292
|
}
|
|
3293
3293
|
if (field.Type !== currentField.Type) {
|
|
3294
|
-
if (field.Type == 'int' && currentField.Type
|
|
3294
|
+
if (field.Type == 'int' && currentField.Type.startsWith('int(')) return 0; // continue
|
|
3295
3295
|
// int(11) is the default for int and used on older versions of mysql
|
|
3296
3296
|
if (field.Type == 'smallint' && currentField.Type.startsWith('smallint(')) return 0; // continue
|
|
3297
3297
|
// smallint(6) is the default for smallint and used on older versions of mysql
|
|
@@ -3299,7 +3299,8 @@ var findDifferences = function findDifferences(expected, current) {
|
|
|
3299
3299
|
// tinyint(1) is the default for tinyint and used on older versions of mysql
|
|
3300
3300
|
if (field.Type == 'varchar' && currentField.Type.startsWith('varchar(')) return 0; // continue
|
|
3301
3301
|
// varchar(255) is the default for varchar and used on older versions of mysql
|
|
3302
|
-
|
|
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
|
|
3303
3304
|
differences.push({
|
|
3304
3305
|
type: 'mismatched_field',
|
|
3305
3306
|
info: "Type",
|
package/dist/index.js
CHANGED
|
@@ -3288,7 +3288,7 @@ var findDifferences = function findDifferences(expected, current) {
|
|
|
3288
3288
|
});
|
|
3289
3289
|
}
|
|
3290
3290
|
if (field.Type !== currentField.Type) {
|
|
3291
|
-
if (field.Type == 'int' && currentField.Type
|
|
3291
|
+
if (field.Type == 'int' && currentField.Type.startsWith('int(')) return 0; // continue
|
|
3292
3292
|
// int(11) is the default for int and used on older versions of mysql
|
|
3293
3293
|
if (field.Type == 'smallint' && currentField.Type.startsWith('smallint(')) return 0; // continue
|
|
3294
3294
|
// smallint(6) is the default for smallint and used on older versions of mysql
|
|
@@ -3296,7 +3296,8 @@ var findDifferences = function findDifferences(expected, current) {
|
|
|
3296
3296
|
// tinyint(1) is the default for tinyint and used on older versions of mysql
|
|
3297
3297
|
if (field.Type == 'varchar' && currentField.Type.startsWith('varchar(')) return 0; // continue
|
|
3298
3298
|
// varchar(255) is the default for varchar and used on older versions of mysql
|
|
3299
|
-
|
|
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
|
|
3300
3301
|
differences.push({
|
|
3301
3302
|
type: 'mismatched_field',
|
|
3302
3303
|
info: "Type",
|
package/package.json
CHANGED
package/src/differences.js
CHANGED
|
@@ -70,11 +70,11 @@ export const findDifferences = (expected, current) => {
|
|
|
70
70
|
differences.push({ type: 'mismatched_field', info: "Default", tableName, field, currentField });
|
|
71
71
|
}
|
|
72
72
|
if (field.Type !== currentField.Type) {
|
|
73
|
-
if(field.Type == 'int' && currentField.Type
|
|
73
|
+
if(field.Type == 'int' && currentField.Type.startsWith('int(')) continue; // int(11) is the default for int and used on older versions of mysql
|
|
74
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
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
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
|
-
|
|
77
|
+
if(field.Type == 'bigint' && currentField.Type.startsWith('bigint(')) continue; // bigint(20) is the default for bigint and used on older versions of mysql
|
|
78
78
|
differences.push({ type: 'mismatched_field', info: "Type", tableName, field, currentField });
|
|
79
79
|
}
|
|
80
80
|
}
|