mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
17 lines
569 B
TypeScript
17 lines
569 B
TypeScript
import type { HydraMigration } from "@main/knex-client";
|
|
import type { Knex } from "knex";
|
|
|
|
export const AddAchievementNotificationPreference: HydraMigration = {
|
|
name: "AddAchievementNotificationPreference",
|
|
up: (knex: Knex) => {
|
|
return knex.schema.alterTable("user_preferences", (table) => {
|
|
return table.boolean("achievementNotificationsEnabled").defaultTo(true);
|
|
});
|
|
},
|
|
|
|
down: (knex: Knex) => {
|
|
return knex.schema.alterTable("user_preferences", (table) => {
|
|
return table.dropColumn("achievementNotificationsEnabled");
|
|
});
|
|
},
|
|
};
|