fix(structure): improve mysql auto-increment editing and field shortcuts

This commit is contained in:
zipg authored and GitHub committed 2026-08-27 18:21:52 +08:00
1 parent 214bf86a6f
commit 4fed29fba2
17 files changed
+285 -78

No files matched your search

@@ -37,9 +37,10 @@ describe("MySQL table AUTO_INCREMENT counter", () => {
});
});
it("is editable only for existing native-MySQL tables with an active existing auto-increment column", () => {
it("is editable only for existing native-MySQL tables with an active auto-increment column draft", () => {
const nativeMysql = { db_type: "mysql", driver_profile: "mysql" } as any;
expect(canEditMysqlAutoIncrementCounter(nativeMysql, false, [existingColumn(true)])).toBe(true);
expect(canEditMysqlAutoIncrementCounter(nativeMysql, false, [{ ...existingColumn(true), original: undefined }])).toBe(true);
expect(canEditMysqlAutoIncrementCounter(nativeMysql, true, [existingColumn(true)])).toBe(false);
expect(canEditMysqlAutoIncrementCounter(nativeMysql, false, [existingColumn(false)])).toBe(false);
expect(canEditMysqlAutoIncrementCounter(nativeMysql, false, [{ ...existingColumn(true), markedForDrop: true }])).toBe(false);