updating code using knex.

This commit is contained in:
Jordan
2025-03-02 20:15:27 -08:00
parent d00e6d62ff
commit a9b5ccf84f
15 changed files with 2557 additions and 605 deletions

View File

@ -0,0 +1,27 @@
import type { Knex } from "knex";
export async function up(knex: Knex): Promise<void> {
await knex.schema.createTable("settings", (table) => {
table.string("host_language");
table.string("libretranslate_base_url");
table.integer("ui_direction");
table.string("whisper_model");
});
await knex.schema.createTable("whisper_models", (table) => {
table.string("model");
table.boolean("download_status");
table.integer("expected_size");
table.text("last_hash"),
table.string("bytes_done");
table.string("bytes_total");
});
}
export async function down(knex: Knex): Promise<void> {
await knex.schema.dropTable("whisper_models");
await knex.schema.dropTable("settings");
}