Backend migration plugin doesn't work


I have started with the development of plugins in Baserow. First of all I have followed the FieldType example tutorial, and once I have added and modified the corresponding files in the backend, I perform the migration, as I have created a new model.

However, once I have included everything and I use Baserow, it shows me an error when creating that type of field, so I understand that the migration of the backend does not occur well because it does not find certain parameters.

The main objective we have is to add fields, which are capable in the backend of running some Python function/script, and capable of extracting information from certain rows in the form of a list (file).

I would appreciate a little help on how to make the migration and get things working in the backend to be able to move forward.


The guides were only tested on a linux operating system so you might hit some oddities like this using windows etc.

My first thought is if you see the log line:

Command given was C:/Program Files/Git/

This looks very wrong, i’m thinking for some reason when you execute:
docker-compose run my-baserow-plugin / backend-cmd manage makemigrations

Your shell is replacing / with C:/Program Files/Git/ for some reason. I’m not too familiar with mingw64 etc, but perhaps adding quotes in somewhere would help and prevent this expansion?

docker-compose run my-baserow-plugin "/ backend-cmd manage makemigrations"

Another work around you could try is:

  1. Launch the dev environment
    docker-compose -f up -d --build
  2. Exec into the backend container manually
    docker exec -it my-baserow-plugin -u baserow_docker_user /bin/bash
  3. Manually activate the virtual env
    source /baserow/venv/bin/activate
  4. cd to the Baserow backend folder:
    cd /baserow/backend
  5. Now hopefully here you can run normal django management commands:
    ./baserow makemigrations

Please note i haven’t tested the above so there might be some typos / issues, please let me know and we’ll get it all working :slight_smile:

I have succeeded in running the first method but no migrations are detected although I have made changes in the backend/

Regarding the second method, when I execute the second step, the message I get is:

OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "-u": executable file not found in $PATH: unknown

Do you know where it could come from?
I think in the first method I am close to obtain it but there must be something missing.

Thank you

Sorry for the incorrect commands, could you instead try?

docker-compose -f run --rm my-baserow-plugin backend-cmd manage makemigrations
docker-compose -f run --rm my-baserow-plugin backend-cmd manage migrate