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