mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
20 lines
616 B
TypeScript
20 lines
616 B
TypeScript
import type { HydraMigration } from "@main/knex-client";
|
|
import type { Knex } from "knex";
|
|
|
|
export const CreateGameAchievement: HydraMigration = {
|
|
name: "CreateGameAchievement",
|
|
up: (knex: Knex) => {
|
|
return knex.schema.createTable("game_achievement", (table) => {
|
|
table.increments("id").primary();
|
|
table.text("objectId").notNullable();
|
|
table.text("shop").notNullable();
|
|
table.text("achievements");
|
|
table.text("unlockedAchievements");
|
|
table.unique(["objectId", "shop"]);
|
|
});
|
|
},
|
|
|
|
down: (knex: Knex) => {
|
|
return knex.schema.dropTable("game_achievement");
|
|
},
|
|
};
|