|
|
@ -4,7 +4,6 @@ import { RelationTypes, UITypes } from 'nocodb-sdk'; |
|
|
|
import type { MetaService } from '~/meta/meta.service'; |
|
|
|
import type { MetaService } from '~/meta/meta.service'; |
|
|
|
import Noco from '~/Noco'; |
|
|
|
import Noco from '~/Noco'; |
|
|
|
import { MetaTable } from '~/utils/globals'; |
|
|
|
import { MetaTable } from '~/utils/globals'; |
|
|
|
import { ThumbnailGeneratorProcessor } from '~/modules/jobs/jobs/thumbnail-generator/thumbnail-generator.processor'; |
|
|
|
|
|
|
|
import { isEE } from '~/utils'; |
|
|
|
import { isEE } from '~/utils'; |
|
|
|
import { Column } from '~/models'; |
|
|
|
import { Column } from '~/models'; |
|
|
|
|
|
|
|
|
|
|
@ -16,12 +15,10 @@ import { Column } from '~/models'; |
|
|
|
export class RecoverLinksMigration { |
|
|
|
export class RecoverLinksMigration { |
|
|
|
private readonly debugLog = debug('nc:migration-jobs:recover-links'); |
|
|
|
private readonly debugLog = debug('nc:migration-jobs:recover-links'); |
|
|
|
|
|
|
|
|
|
|
|
constructor( |
|
|
|
constructor() {} |
|
|
|
private readonly thumbnailGeneratorProcessor: ThumbnailGeneratorProcessor, |
|
|
|
|
|
|
|
) {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log = (...msgs: string[]) => { |
|
|
|
log = (...msgs: string[]) => { |
|
|
|
console.log('[nc_job_003_thumbnail]: ', ...msgs); |
|
|
|
console.log('[nc_job_003_recover_links]: ', ...msgs); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
async job() { |
|
|
|
async job() { |
|
|
@ -317,6 +314,7 @@ export class RecoverLinksMigration { |
|
|
|
this.log(`Recovered column '${column.title}' (ID: '${column.id}')`); |
|
|
|
this.log(`Recovered column '${column.title}' (ID: '${column.id}')`); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.log('Recovery completed'); |
|
|
|
await (await ncMeta).commit(); |
|
|
|
await (await ncMeta).commit(); |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
await (await ncMeta).rollback(e); |
|
|
|
await (await ncMeta).rollback(e); |
|
|
|