mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feature: wip-game-achievements
refactor: rename files
This commit is contained in:
parent
fabeedaa8a
commit
8fb62af0cf
18 changed files with 739 additions and 0 deletions
|
|
@ -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");
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue