mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
17 lines
483 B
TypeScript
17 lines
483 B
TypeScript
import type { HydraMigration } from "@main/knex-client";
|
|
import type { Knex } from "knex";
|
|
|
|
export const EnsureRepackUris: HydraMigration = {
|
|
name: "EnsureRepackUris",
|
|
up: async (knex: Knex) => {
|
|
await knex.schema.hasColumn("repack", "uris").then(async (exists) => {
|
|
if (!exists) {
|
|
await knex.schema.table("repack", (table) => {
|
|
table.text("uris").notNullable().defaultTo("[]");
|
|
});
|
|
}
|
|
});
|
|
},
|
|
|
|
down: async (_knex: Knex) => {},
|
|
};
|