feat: add 'startMinimized' property to user preferences

This commit is contained in:
Hachi-R
2024-10-30 14:38:27 -03:00
parent 0a86ec89aa
commit 6dd454a982
4 changed files with 23 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
import type { HydraMigration } from "@main/knex-client";
import type { Knex } from "knex";
export const QualityOfLife: HydraMigration = {
name: "QualityOfLife",
up: (knex: Knex) => {
return knex.schema.alterTable("user_preferences", (table) => {
return table.boolean("startMinimized").notNullable().defaultTo(0);
});
},
down: async (knex: Knex) => {
return knex.schema.alterTable("user_preferences", (table) => {
return table.dropColumn("startMinimized");
});
},
};