mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
rename all->backup
This commit is contained in:
parent
e537dfd13d
commit
c40f26cb54
|
@ -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))
|
|
@ -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);
|
Loading…
Reference in a new issue