Making migrations when developing a plugin, I had to do it that way

the docs here Field type // Baserow say we should be able to do the following:

docker-compose run my-baserow-plugin /baserow.sh backend-cmd manage makemigrations
docker-compose run my-baserow-plugin /baserow.sh backend-cmd manage migrate

that didn’t work for me. The baserow.sh script kept showing me the help / command list. I found I had to start my all in one container, then make migrations the following way, making sure to specify my app name (baserow_vocabai_plugin), otherwise no migrations would be detected.

docker container exec e214ca3b3644 /baserow.sh backend-cmd manage makemigrations baserow_vocabai_plugin
docker container exec e214ca3b3644 /baserow.sh backend-cmd manage migrate baserow_vocabai_plugin
1 Like

Apologies this is indeed incorrect I will fix shortly :slight_smile: The correct commands should be:

docker-compose -f docker-compose.dev.yml run --rm my-baserow-plugin backend-cmd manage makemigrations
docker-compose -f docker-compose.dev.yml run --rm my-baserow-plugin backend-cmd-with-db manage migrate