a_i fix
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
jusax23 2023-02-19 20:24:25 +01:00
parent 123bbeba6c
commit 88321c76d1

View file

@ -181,7 +181,7 @@ export class Handler {
const attrData = tableD[keys[j]]; const attrData = tableD[keys[j]];
if (attrData == null) { if (attrData == null) {
create.appendEnding(handler.querys.addColumn(handler, a)); create.appendEnding(handler.querys.addColumn(handler, a));
changePrimary = true; if (a.ops.primaryKey) changePrimary = true;
} else if ( } else if (
!handler.builders.compareDatatypes(handler, a.type, attrData.Type) || !handler.builders.compareDatatypes(handler, a.type, attrData.Type) ||
a.ops.default != attrData.Default || a.ops.default != attrData.Default ||
@ -193,14 +193,18 @@ export class Handler {
(!!a.ops.notNull || !!a.ops.autoIncrement || !!a.ops.primaryKey), (attrData.Null == "NO"), "|", (!!a.ops.notNull || !!a.ops.autoIncrement || !!a.ops.primaryKey), (attrData.Null == "NO"), "|",
(!!a.ops.autoIncrement), (attrData.Extra == "auto_increment"));*/ (!!a.ops.autoIncrement), (attrData.Extra == "auto_increment"));*/
freeForUpdate(a.name, a.table.dbLangTableName); freeForUpdate(a.name, a.table.dbLangTableName);
if (a.ops.autoIncrement) if (a.ops.autoIncrement) {
a.ops.autoIncrement = false;
create.appendEnding(handler.querys.changeColumn(handler, a)); create.appendEnding(handler.querys.changeColumn(handler, a));
a.ops.autoIncrement = true;
connst.appendEnding(handler.querys.changeColumn(handler, a));
} }
if (attrData == null) { else create.appendEnding(handler.querys.changeColumn(handler, a));
changePrimary = true; }
} else { if (attrData != null) {
if ((attrData.Key == "PRI") != (!!a.ops.primaryKey)) { if ((attrData.Key == "PRI") != (!!a.ops.primaryKey)) {
freeForUpdate(a.name, a.table.dbLangTableName); freeForUpdate(a.name, a.table.dbLangTableName);
console.log("206");
changePrimary = true; changePrimary = true;
} }
} }