added format command and added trailing commas to reduce conflicts

This commit is contained in:
dswbx
2025-02-26 20:06:03 +01:00
parent 88b5359f1c
commit 7743f71a11
414 changed files with 3622 additions and 3610 deletions

View File

@@ -17,18 +17,18 @@ export const migrations: Migration[] = [
{
version: 1,
//schema: true,
up: async (config) => config
up: async (config) => config,
},
{
version: 2,
up: async (config, { db }) => {
return config;
}
},
},
{
version: 3,
//schema: true,
up: async (config) => config
up: async (config) => config,
},
{
version: 4,
@@ -37,10 +37,10 @@ export const migrations: Migration[] = [
...config,
auth: {
...config.auth,
basepath: "/api/auth2"
}
basepath: "/api/auth2",
},
};
}
},
},
{
version: 5,
@@ -49,13 +49,13 @@ export const migrations: Migration[] = [
const cors = config.server.cors?.allow_methods ?? [];
set(config.server, "cors.allow_methods", [...new Set([...cors, "PATCH"])]);
return config;
}
},
},
{
version: 6,
up: async (config, { db }) => {
return config;
}
},
},
{
version: 7,
@@ -67,11 +67,11 @@ export const migrations: Migration[] = [
...config,
auth: {
...config.auth,
jwt
}
jwt,
},
};
}
}
},
},
/*{
version: 8,
up: async (config, { db }) => {
@@ -88,7 +88,7 @@ export async function migrateTo(
current: number,
to: number,
config: GenericConfigObject,
ctx: MigrationContext
ctx: MigrationContext,
): Promise<[number, GenericConfigObject]> {
//console.log("migrating from", current, "to", CURRENT_VERSION, config);
const todo = migrations.filter((m) => m.version > current && m.version <= to);
@@ -115,7 +115,7 @@ export async function migrateTo(
export async function migrate(
current: number,
config: GenericConfigObject,
ctx: MigrationContext
ctx: MigrationContext,
): Promise<[number, GenericConfigObject]> {
return migrateTo(current, CURRENT_VERSION, config, ctx);
}