From 5a22cc88c554e431af92d5cb649f79d1b17b2862 Mon Sep 17 00:00:00 2001 From: Paul Rastoin <45004772+prastoin@users.noreply.github.com> Date: Fri, 10 Apr 2026 15:44:16 +0200 Subject: [PATCH] `database:reset` depends on `database:init` that runs slow instance commands (#19557) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ```ts Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] LogicFunctionModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] ApplicationUpgradeModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkspaceModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] IteratorActionModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] DelayActionModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] RestApiCoreModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] RecordCRUDActionModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowTriggerModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] TimelineMessagingModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowVersionModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] UserModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowToolsModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] ApplicationOAuthModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] BillingWebhookModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AiAgentExecutionModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AiAgentActionModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] ToolProviderModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AiAgentMonitorModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowExecutorModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowRunnerModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] McpModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AiChatModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowApiModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AuthModule dependencies initialized [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [DatabaseConfigDriver] [INIT] Loading initial config variables from database [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [DatabaseConfigDriver] [INIT] Config variables loaded: 1 values found in DB, 83 falling to env vars/defaults [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [UpgradeCommandRegistryService] Registered 3 fast instance, 0 slow instance, and 14 workspace command(s) for 1.21.0 [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [UpgradeCommandRegistryService] Registered 4 fast instance, 1 slow instance, and 3 workspace command(s) for 1.22.0 [Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [GenerateInstanceCommandCommand] Generating fast instance command for version 1.22.0... [Nest] 46347 - 04/10/2026, 3:37:43 PM WARN [GenerateInstanceCommandCommand] No changes in database schema were found - cannot generate a migration. ——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————— NX Successfully ran target database:migrate:generate for project twenty-server and 8 tasks it depends on (11s) With additional flags: --name=martmull ``` --- packages/twenty-server/project.json | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/twenty-server/project.json b/packages/twenty-server/project.json index 6b351eb5ce..f5a20abebf 100644 --- a/packages/twenty-server/project.json +++ b/packages/twenty-server/project.json @@ -202,6 +202,18 @@ "command": "node dist/command/command.js run-instance-commands --force" } }, + "database:init": { + "executor": "nx:run-commands", + "dependsOn": ["build"], + "options": { + "cwd": "packages/twenty-server", + "commands": [ + "node dist/database/scripts/setup-db.js", + "nx database:migrate -- --include-slow" + ], + "parallel": false + } + }, "database:migrate:generate": { "executor": "nx:run-commands", "dependsOn": ["build"], @@ -228,8 +240,7 @@ "cwd": "packages/twenty-server", "commands": [ "node dist/database/scripts/truncate-db.js", - "node dist/database/scripts/setup-db.js", - "nx database:migrate", + "nx database:init", "nx command-no-deps -- cache:flush" ], "parallel": false @@ -238,8 +249,7 @@ "cwd": "packages/twenty-server", "commands": [ "node dist/database/scripts/truncate-db.js", - "node dist/database/scripts/setup-db.js", - "nx database:migrate", + "nx database:init", "nx command-no-deps -- cache:flush", "nx command-no-deps -- workspace:seed:dev" ],