feat: add skip attachment files option for import

Allows importing only database records without restoring attachment
files. Useful when migrating data between instances.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-29 20:06:12 +00:00
parent 412b1e643b
commit a8c4a2ebe1
6 changed files with 19 additions and 1 deletions
@@ -150,6 +150,14 @@
<span class="text-muted"> — {{translate 'skipDuplicatesHint' category='messages' scope='DataMigration'}}</span>
</label>
</div>
<div class="checkbox">
<label>
<input type="checkbox" name="importNoFiles">
{{translate 'Skip attachment files' scope='DataMigration'}}
<span class="text-muted"> — {{translate 'importNoFilesHint' category='messages' scope='DataMigration'}}</span>
</label>
</div>
</div>
<div class="btn-group">
@@ -301,6 +301,7 @@ define('modules/data-migration/views/admin/data-migration', ['view'], function (
const preserveIds = this.$el.find('input[name="preserveIds"]').is(':checked');
const skipDuplicates = this.$el.find('input[name="skipDuplicates"]').is(':checked');
const noFiles = this.$el.find('input[name="importNoFiles"]').is(':checked');
const confirmMsg = dryRun
? this.translate('dryRunConfirmation', 'messages', 'DataMigration')
@@ -315,6 +316,7 @@ define('modules/data-migration/views/admin/data-migration', ['view'], function (
Espo.Ajax.postRequest('DataMigration/action/import', {
backupName: this.selectedBackup,
preserveIds: preserveIds,
noFiles: noFiles,
skipDuplicates: skipDuplicates,
dryRun: dryRun,
}, {timeout: 600000})