refactor: rename migration to be more descriptive

This commit is contained in:
Hachi-R 2024-10-31 11:39:18 -03:00
parent 43558f8c0e
commit 5fb08b39fa
2 changed files with 4 additions and 4 deletions

View File

@ -11,7 +11,7 @@ import { AddAchievementNotificationPreference } from "./migrations/2024101301290
import { CreateUserSubscription } from "./migrations/20241015235142_create_user_subscription";
import { AddBackgroundImageUrl } from "./migrations/20241016100249_add_background_image_url";
import { AddWinePrefixToGame } from "./migrations/20241019081648_add_wine_prefix_to_game";
import { QualityOfLife } from "./migrations/20241030171454_quality_of_life";
import { AddStartMinimizedColumn } from "./migrations/20241030171454_add_start_minimized_column";
export type HydraMigration = Knex.Migration & { name: string };
class MigrationSource implements Knex.MigrationSource<HydraMigration> {
@ -27,7 +27,7 @@ class MigrationSource implements Knex.MigrationSource<HydraMigration> {
CreateUserSubscription,
AddBackgroundImageUrl,
AddWinePrefixToGame,
QualityOfLife,
AddStartMinimizedColumn,
]);
}
getMigrationName(migration: HydraMigration): string {

View File

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