refactor(core): Move first batch of repositories to @n8n/db (#15130)

This commit is contained in:
Iván Ovejero
2025-05-06 11:22:43 +02:00
committed by GitHub
parent 939ff97ec4
commit ade546fb48
151 changed files with 338 additions and 299 deletions

View File

@@ -14,7 +14,7 @@ mockInstance(LoadNodesAndCredentials);
const command = setupTestCommand(ImportCredentialsCommand);
beforeEach(async () => {
await testDb.truncate(['Credentials', 'SharedCredentials', 'User']);
await testDb.truncate(['CredentialsEntity', 'SharedCredentials', 'User']);
});
test('import:credentials should import a credential', async () => {

View File

@@ -14,7 +14,7 @@ mockInstance(LoadNodesAndCredentials);
const command = setupTestCommand(ImportWorkflowsCommand);
beforeEach(async () => {
await testDb.truncate(['Workflow', 'SharedWorkflow', 'User']);
await testDb.truncate(['WorkflowEntity', 'SharedWorkflow', 'User']);
});
test('import:workflow should import active workflow and deactivate it', async () => {

View File

@@ -1,9 +1,9 @@
import { CredentialsRepository } from '@n8n/db';
import { Container } from '@n8n/di';
import { EntityNotFoundError } from '@n8n/typeorm';
import { v4 as uuid } from 'uuid';
import { Reset } from '@/commands/ldap/reset';
import { CredentialsRepository } from '@/databases/repositories/credentials.repository';
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';
import { WorkflowRepository } from '@/databases/repositories/workflow.repository';

View File

@@ -1,8 +1,8 @@
import { CredentialsEntity } from '@n8n/db';
import { CredentialsRepository } from '@n8n/db';
import { Container } from '@n8n/di';
import { Reset } from '@/commands/user-management/reset';
import { CredentialsRepository } from '@/databases/repositories/credentials.repository';
import { SettingsRepository } from '@/databases/repositories/settings.repository';
import { SharedCredentialsRepository } from '@/databases/repositories/shared-credentials.repository';
import { SharedWorkflowRepository } from '@/databases/repositories/shared-workflow.repository';

View File

@@ -10,7 +10,7 @@ mockInstance(LoadNodesAndCredentials);
const command = setupTestCommand(UpdateWorkflowCommand);
beforeEach(async () => {
await testDb.truncate(['Workflow']);
await testDb.truncate(['WorkflowEntity']);
});
test('update:workflow can activate all workflows', async () => {