How to make changes to the database, while running on local

Describe the issue/error/question

Hello, I am trying to do some modifications to the codebase (for example, adding a field to the database).

I followed the CONTRIBUTING guide and executed the project(s) with: npm run dev.
Everything worked fine.

It’s not clear what database it is currently using (since it’s not the cloud database and it’s not the Docker one, I don’t have any container/app running).
To setup postgres I followed the instructions on this page (Supported databases and settings).

Anyway, the app is running on the port :5678 and I can add and edit my workflows.
I tried to edit some .vue file and the watcher updated the UI correctly.
When I tried to edit an entity file no changes were made to the database, and no migration file was created.

I don’t understand what I am doing wrong, my main intents are to add some fields in the database and in the UI while running the project with the npm run dev command; then to deploy those changes in a Docker image with the docker build -t n8n-custom -f docker/images/n8n-custom/Dockerfile . command.

Information on your n8n setup

  • n8n version: 0.168.2
  • node version: 14.18.0
  • npm version: 6.14.15
  • Database you’re using (default: SQLite): Postgres
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm,, desktop app]: npm run dev

Hey @arezzo,

Welcome to the community :tada:

When making core or UI changes you would need to run the build command again so it could be that, I suspect though as you running from source it might still be using the SQLite database. Did you set the environment variables before running so that it uses Postgres?

I have not really poked the database too much but I am curious to know what you are adding :slightly_smiling_face: