mirror of
https://github.com/dbgate/dbgate
synced 2024-11-21 15:28:20 +00:00
commented handle autoincrement change
This commit is contained in:
parent
b0012872fa
commit
8035380e7b
@ -167,13 +167,13 @@ describe('Alter table', () => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
test.each(engines.map(engine => [engine.label, engine]))(
|
// test.each(engines.map(engine => [engine.label, engine]))(
|
||||||
'Change autoincrement - %s',
|
// 'Change autoincrement - %s',
|
||||||
testWrapper(async (conn, driver, engine) => {
|
// testWrapper(async (conn, driver, engine) => {
|
||||||
await testTableDiff(engine, conn, driver, tbl => {
|
// await testTableDiff(engine, conn, driver, tbl => {
|
||||||
tbl.columns.find(x => x.columnName == 'col_pk').autoIncrement = true;
|
// tbl.columns.find(x => x.columnName == 'col_pk').autoIncrement = true;
|
||||||
});
|
// });
|
||||||
})
|
// })
|
||||||
);
|
// );
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -416,12 +416,12 @@ export class AlterPlan {
|
|||||||
this._testTableRecreate(op, 'createConstraint', obj => this._canCreateConstraint(obj), 'newObject') ||
|
this._testTableRecreate(op, 'createConstraint', obj => this._canCreateConstraint(obj), 'newObject') ||
|
||||||
this._testTableRecreate(op, 'dropConstraint', obj => this._canDropConstraint(obj), 'oldObject') ||
|
this._testTableRecreate(op, 'dropConstraint', obj => this._canDropConstraint(obj), 'oldObject') ||
|
||||||
this._testTableRecreate(op, 'changeColumn', this.dialect.changeColumn, 'newObject') ||
|
this._testTableRecreate(op, 'changeColumn', this.dialect.changeColumn, 'newObject') ||
|
||||||
this._testTableRecreate(
|
// this._testTableRecreate(
|
||||||
op,
|
// op,
|
||||||
'changeColumn',
|
// 'changeColumn',
|
||||||
obj => this._canChangeAutoIncrement(obj, op as AlterOperation_ChangeColumn),
|
// obj => this._canChangeAutoIncrement(obj, op as AlterOperation_ChangeColumn),
|
||||||
'newObject'
|
// 'newObject'
|
||||||
) ||
|
// ) ||
|
||||||
this._testTableRecreate(op, 'renameColumn', true, 'object') || [op]
|
this._testTableRecreate(op, 'renameColumn', true, 'object') || [op]
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
@ -449,12 +449,12 @@ export class AlterPlan {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
_canChangeAutoIncrement(column: ColumnInfo, op: AlterOperation_ChangeColumn) {
|
// _canChangeAutoIncrement(column: ColumnInfo, op: AlterOperation_ChangeColumn) {
|
||||||
if (!!column.autoIncrement != !!op.oldObject.autoIncrement) {
|
// if (!!column.autoIncrement != !!op.oldObject.autoIncrement) {
|
||||||
return this.dialect.changeAutoIncrement;
|
// return this.dialect.changeAutoIncrement;
|
||||||
}
|
// }
|
||||||
return null;
|
// return null;
|
||||||
}
|
// }
|
||||||
|
|
||||||
_testTableRecreate(
|
_testTableRecreate(
|
||||||
op: AlterOperation,
|
op: AlterOperation,
|
||||||
|
Loading…
Reference in New Issue
Block a user