feature: wip-game-achievements

refactor: rename files
This commit is contained in:
JackEnx
2024-05-08 15:38:52 -03:00
committed by Zamitto
parent fabeedaa8a
commit 8fb62af0cf
18 changed files with 739 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import type { HydraMigration } from "@main/knex-client";
import type { Knex } from "knex";
export const CreateGameAchievement: HydraMigration = {
name: "CreateGameAchievement",
up: async (knex: Knex) => {
await knex.schema.createTable("game_achievement", (table) => {
table.increments("id").primary();
table.integer("gameId").notNullable();
table.text("achievements");
table.foreign("gameId").references("game.id").onDelete("CASCADE");
});
},
down: async (knex: Knex) => {
await knex.schema.dropTable("game_achievement");
},
};