mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
chore: version
This commit is contained in:
parent
8258127616
commit
214e39adda
@ -4,14 +4,55 @@ import type { Knex } from "knex";
|
|||||||
export const EnsureRepackUris: HydraMigration = {
|
export const EnsureRepackUris: HydraMigration = {
|
||||||
name: "EnsureRepackUris",
|
name: "EnsureRepackUris",
|
||||||
up: async (knex: Knex) => {
|
up: async (knex: Knex) => {
|
||||||
await knex.schema.hasColumn("repack", "uris").then(async (exists) => {
|
await knex.schema.createTable("temporary_repack", (table) => {
|
||||||
if (!exists) {
|
const timestamp = new Date().getTime();
|
||||||
await knex.schema.table("repack", (table) => {
|
table.increments("id").primary();
|
||||||
|
table
|
||||||
|
.text("title")
|
||||||
|
.notNullable()
|
||||||
|
.unique({ indexName: "repack_title_unique_" + timestamp });
|
||||||
|
table
|
||||||
|
.text("magnet")
|
||||||
|
.notNullable()
|
||||||
|
.unique({ indexName: "repack_magnet_unique_" + timestamp });
|
||||||
|
table.text("repacker").notNullable();
|
||||||
|
table.text("fileSize").notNullable();
|
||||||
|
table.datetime("uploadDate").notNullable();
|
||||||
|
table.datetime("createdAt").notNullable().defaultTo(knex.fn.now());
|
||||||
|
table.datetime("updatedAt").notNullable().defaultTo(knex.fn.now());
|
||||||
|
table
|
||||||
|
.integer("downloadSourceId")
|
||||||
|
.references("download_source.id")
|
||||||
|
.onDelete("CASCADE");
|
||||||
table.text("uris").notNullable().defaultTo("[]");
|
table.text("uris").notNullable().defaultTo("[]");
|
||||||
});
|
});
|
||||||
}
|
await knex.raw(
|
||||||
});
|
`INSERT INTO "temporary_repack"("id", "title", "magnet", "repacker", "fileSize", "uploadDate", "createdAt", "updatedAt", "downloadSourceId") SELECT "id", "title", "magnet", "repacker", "fileSize", "uploadDate", "createdAt", "updatedAt", "downloadSourceId" FROM "repack"`
|
||||||
|
);
|
||||||
|
await knex.schema.dropTable("repack");
|
||||||
|
await knex.schema.renameTable("temporary_repack", "repack");
|
||||||
},
|
},
|
||||||
|
|
||||||
down: async (_knex: Knex) => {},
|
down: async (knex: Knex) => {
|
||||||
|
await knex.schema.renameTable("repack", "temporary_repack");
|
||||||
|
await knex.schema.createTable("repack", (table) => {
|
||||||
|
table.increments("id").primary();
|
||||||
|
table.text("title").notNullable().unique();
|
||||||
|
table.text("magnet").notNullable().unique();
|
||||||
|
table.integer("page");
|
||||||
|
table.text("repacker").notNullable();
|
||||||
|
table.text("fileSize").notNullable();
|
||||||
|
table.datetime("uploadDate").notNullable();
|
||||||
|
table.datetime("createdAt").notNullable().defaultTo(knex.fn.now());
|
||||||
|
table.datetime("updatedAt").notNullable().defaultTo(knex.fn.now());
|
||||||
|
table
|
||||||
|
.integer("downloadSourceId")
|
||||||
|
.references("download_source.id")
|
||||||
|
.onDelete("CASCADE");
|
||||||
|
});
|
||||||
|
await knex.raw(
|
||||||
|
`INSERT INTO "repack"("id", "title", "magnet", "repacker", "fileSize", "uploadDate", "createdAt", "updatedAt", "downloadSourceId") SELECT "id", "title", "magnet", "repacker", "fileSize", "uploadDate", "createdAt", "updatedAt", "downloadSourceId" FROM "temporary_repack"`
|
||||||
|
);
|
||||||
|
await knex.schema.dropTable("temporary_repack");
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
@ -100,6 +100,7 @@ export function SidebarProfile() {
|
|||||||
textOverflow: "ellipsis",
|
textOverflow: "ellipsis",
|
||||||
whiteSpace: "nowrap",
|
whiteSpace: "nowrap",
|
||||||
width: "100%",
|
width: "100%",
|
||||||
|
textAlign: "left",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<small>{gameRunning.title}</small>
|
<small>{gameRunning.title}</small>
|
||||||
|
@ -26,7 +26,7 @@ export const sidebar = recipe({
|
|||||||
paddingTop: `${SPACING_UNIT * 6}px`,
|
paddingTop: `${SPACING_UNIT * 6}px`,
|
||||||
},
|
},
|
||||||
false: {
|
false: {
|
||||||
paddingTop: `${SPACING_UNIT * 2}px`,
|
paddingTop: `${SPACING_UNIT}px`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user