rename all->backup

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2024-09-23 22:26:08 +02:00
parent e537dfd13d
commit c40f26cb54
No known key found for this signature in database
2 changed files with 8 additions and 8 deletions

View file

@ -22,10 +22,10 @@ const excludeList = [
'annotation_tag_entity',
];
export class ExportAllCommand extends BaseCommand {
static description = 'Export Everything';
export class ExportBackupCommand extends BaseCommand {
static description = 'Backup to a zip file';
static examples = ['$ n8n export:all', '$ n8n export:all --output=backup.zip'];
static examples = ['$ n8n export:backup', '$ n8n export:backup --output=backup.zip'];
static flags = {
output: Flags.string({
@ -36,7 +36,7 @@ export class ExportAllCommand extends BaseCommand {
};
async run() {
const { flags } = await this.parse(ExportAllCommand);
const { flags } = await this.parse(ExportBackupCommand);
const connection = Container.get(DataSource);
const tables = connection.entityMetadatas
.filter((v) => !excludeList.includes(v.tableName))

View file

@ -21,10 +21,10 @@ const excludeList = [
'annotation_tag_entity',
];
export class ImportAllCommand extends BaseCommand {
static description = 'Import Everything';
export class ImportBackupCommand extends BaseCommand {
static description = 'Import from a backup zip file';
static examples = ['$ n8n import:all', '$ n8n import:all --input=backup.zip'];
static examples = ['$ n8n import:backup', '$ n8n import:backup --input=backup.zip'];
// TODO: add `clean` flag, or add a prompt to confirm DB truncation
static flags = {
@ -37,7 +37,7 @@ export class ImportAllCommand extends BaseCommand {
// TODO: do batching
async run() {
const { flags } = await this.parse(ImportAllCommand);
const { flags } = await this.parse(ImportBackupCommand);
// TODO:
// 1. check last migrations
const connection = Container.get(DataSource);