mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-28 06:05:24 +00:00
fix(host-metrics): exclude image and firmware filesystems (#1469)
* fix(host-metrics): exclude image and firmware filesystems * fix(ci): build plugin SDK before dependent checks * fix(mysql): keep plugin settings scope indexes within limits * test(mysql): refresh reviewed plugin upgrade SQL
This commit is contained in:
1 parent
c38c2e84b8
commit
710f545e34
14 files changed
+4938
-16
No files matched your search
@@ -141,6 +141,27 @@ describe("mysql output", () => {
|
||||
expect(out).toContain('varchar("user_id", { length: 255 })');
|
||||
expect(out).toContain('text("name")');
|
||||
});
|
||||
|
||||
it("keeps closed scopes compact in four-column setting indexes", () => {
|
||||
const source = `import { sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
|
||||
export const pluginSettings = sqliteTable("plugin_settings", {
|
||||
pluginId: text("plugin_id").notNull(),
|
||||
scope: text("scope", { enum: ["admin", "user", "host", "secret"] }).notNull(),
|
||||
scopeId: text("scope_id"),
|
||||
key: text("key").notNull(),
|
||||
}, (table) => [uniqueIndex("scope_key").on(table.pluginId, table.scope, table.scopeId, table.key)]);
|
||||
`;
|
||||
const mysql = transform(source, "mysql");
|
||||
expect(mysql).toContain(
|
||||
'mysqlEnum("scope", ["admin", "user", "host", "secret"])',
|
||||
);
|
||||
for (const name of ["plugin_id", "scope_id", "key"]) {
|
||||
expect(mysql).toContain(`varchar("${name}", { length: 255 })`);
|
||||
}
|
||||
expect(transform(source, "postgres")).toContain(
|
||||
'varchar("scope", { length: 255, enum: ["admin", "user", "host", "secret"] })',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("determinism", () => {
|
||||
|
||||
Reference in new issue
Block a user