How are you running n8n is it Docker, npm, cloud, desktop or something else? Can you also let me know what version you are upgrading to I assume 0.161.0 is the version you are coming from. Could you also share the full error message you are seeing and how you are importing the workflows, In theory you shouldn’t need to import them as the database would be upgraded.
@Jon Thanks for the welcome.
When running the below command: ❯ n8n import:workflow --separate --input=seed/workflows
Getting the below error: An error occurred while importing workflows. See log messages for details. SQLITE_CONSTRAINT: NOT NULL constraint failed: workflow_entity.name
@Jon Upon looking more closely got the issue. When we are trying to import the workflows that are created in local using the browser , they have a json format as follows: [{"name": "Test Workflow", ....}]
But the expected json format for import command is: {"name": "Test Workflow",....}
Now till n8n version: 0.161.0 the n8n import command supported both the formats. post that it only supports the latter.
Interestingly when we use the following export command: n8n export:credentials --id=1 --output=/home/n8n/seed/credentials/1_test.json
It always exports the json file in following format: [{"name":"Test 1 Credentials", ....}]
upon modifying the above json to : {"name": "Test 1 Credentials", ...}
The import commands works fine