From deec85c38eb0a7e6a580ad6165ff4fcc97cf28bc Mon Sep 17 00:00:00 2001 From: Rihan Arfan Date: Thu, 24 Oct 2024 03:40:03 +0100 Subject: [PATCH] refactor: consistent naming --- src/runtime/database/server/utils/migrations.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/runtime/database/server/utils/migrations.ts b/src/runtime/database/server/utils/migrations.ts index fed972fc..504e605d 100644 --- a/src/runtime/database/server/utils/migrations.ts +++ b/src/runtime/database/server/utils/migrations.ts @@ -10,11 +10,11 @@ export const applyMigrations = async () => { await db.prepare(createMigrationsTableQuery).run() // create migrations table - const remoteMigrations = (await db.prepare(appliedMigrationsQuery).all()).results - if (!remoteMigrations.length) log.warn(`No applied migrations on \`dev\``) + const appliedMigrations = (await db.prepare(appliedMigrationsQuery).all()).results + if (!appliedMigrations.length) log.warn(`No applied migrations on \`dev\``) const localMigrations = (await getMigrationFiles()).map(fileName => fileName.replace('.sql', '')) - const pendingMigrations = localMigrations.filter(localName => !remoteMigrations.find(({ name }) => name === localName)) + const pendingMigrations = localMigrations.filter(localName => !appliedMigrations.find(({ name }) => name === localName)) if (!pendingMigrations.length) return log.info('No pending migrations to apply') for (const migration of pendingMigrations) {