mirror of
https://github.com/shishantbiswas/bknd.git
synced 2026-03-17 12:56:05 +00:00
added format command and added trailing commas to reduce conflicts
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user