You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-23 22:36:32 +02:00
Server: Fixed incorrectly named database migration that prevents new migrations from being applied
This commit is contained in:
@@ -287,12 +287,17 @@ export const sqliteSyncSlave = async (master: DbConnection, slave: DbConnection)
|
||||
await reconnectDb(slave);
|
||||
};
|
||||
|
||||
// This can be used to fix migration names, once the migration has already been deployed.
|
||||
// Incorrectly named migrations may end up being applied in the wrong order.
|
||||
const fixMigrationNames = async (db: DbConnection) => {
|
||||
// This can be used to fix migration names, once the migration has already been deployed.
|
||||
// Incorrectly named migrations may end up being applied in the wrong order.
|
||||
try {
|
||||
await db('knex_migrations')
|
||||
.update({ name: '20250404091200_user_auth_code.js' })
|
||||
.where('name', '=', '202504040912000_user_auth_code.js');
|
||||
} catch (error) {
|
||||
if (isNoSuchTableError(error)) return;
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
export async function migrateLatest(db: DbConnection, disableTransactions = false) {
|
||||
|
||||
Reference in New Issue
Block a user