mirror of
https://github.com/hydralauncher/hydra.git
synced 2026-01-25 20:01:03 +00:00
feature: wip-game-achievements
refactor: rename files
This commit is contained in:
@@ -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");
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user