File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
internal/database/migrations Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -578,7 +578,7 @@ export default async function routes(fastify: FastifyInstance) {
578578 tenantId,
579579 upToMigration : dbMigrationFreezeAt ,
580580 } )
581- reply . send ( {
581+ return reply . send ( {
582582 migrated : true ,
583583 } )
584584 } catch ( e ) {
@@ -668,12 +668,12 @@ export default async function routes(fastify: FastifyInstance) {
668668 fastify . get < tenantRequestInterface > ( '/:tenantId/health' , async ( req , res ) => {
669669 try {
670670 await req . storage . healthcheck ( )
671- res . send ( { healthy : true } )
671+ return res . send ( { healthy : true } )
672672 } catch ( e ) {
673673 if ( e instanceof Error ) {
674674 req . executionError = e
675675 }
676- res . send ( { healthy : false } )
676+ return res . send ( { healthy : false } )
677677 }
678678 } )
679679 } )
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ export default async function routes(fastify: FastifyInstance) {
1313 async ( req , res ) => {
1414 try {
1515 await req . storage . healthcheck ( )
16- res . send ( { healthy : true } )
16+ return res . send ( { healthy : true } )
1717 } catch ( e ) {
1818 if ( e instanceof Error ) {
1919 req . executionError = e
2020 }
21- res . send ( { healthy : false } )
21+ return res . send ( { healthy : false } )
2222 }
2323 }
2424 )
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { getTenantConfig, TenantMigrationStatus } from '../tenant'
1111import { multitenantKnex } from '../multitenant-db'
1212import { ProgressiveMigrations } from './progressive'
1313import { ResetMigrationsOnTenant , RunMigrationsOnTenants } from '@storage/events'
14- import { ERRORS , StorageBackendError } from '@internal/errors'
14+ import { ERRORS } from '@internal/errors'
1515import { DBMigration } from './types'
1616import { getSslSettings } from '../ssl'
1717import { MigrationTransformer , DisableConcurrentIndexTransformer } from './transformers'
@@ -699,11 +699,19 @@ function runMigrations({
699699 `Migration failed. Reason: ${ ( e as Error ) . message } ` ,
700700 e as MigrationError
701701 ) . withMetadata ( {
702- migrationsToRun : migrationsToRun ,
702+ currentMigrations : appliedMigrations . map ( ( migration ) => ( {
703+ id : migration . id ,
704+ name : migration . name ,
705+ hash : migration . hash ,
706+ } ) ) ,
707+ migrationsToRun : migrationsToRun . map ( ( migration ) => ( {
708+ id : migration . id ,
709+ name : migration . name ,
710+ hash : migration . hash ,
711+ } ) ) ,
703712 migrationId : migration . id ,
704713 migrationName : migration . name ,
705714 migrationHash : migration . hash ,
706- migrationSql : migration . sql ,
707715 } )
708716 }
709717 }
You can’t perform that action at this time.
0 commit comments