Netbox migration process #21108
|
Hello, I installed netbox first in version 4.1.3 and I move to 4.4.10 So far I have not met many problems however, there might be migration commands to add columns in the database when it's needed. I tried everytime to use the migrate commands but it fails. Here from 4.4.10 to 4.5.0 So what should I do with the migrate commands ? |
Replies: 7 comments 7 replies
|
You need to define the API_TOKEN_PEPPERS value in your configuration.py. Check out the configuration_testing.py file here to help understand how to configure and set those values:: https://github.com/netbox-community/netbox/pull/20477/files |
|
Hello, Thank you for your answer I added the API_TOKEN_PEPPERS token However I don't know if i'm required to run this command or not Before that I did run this one |
|
Hello, Actually my question was about the migrate command not about the token. So my question is, is it requiered to run this command when you migrate from one version to another Regards |
|
Hello, Thank you for your answer. Here's the command output Thank you |
|
Thank you for your answer I did a fresh install and just copied configuration.py and media/ reports/ scripts so I jumped to what you asked at the end I don't know how to interpret this but it seems it's related with the hash |
|
Wow thank you very much for reproducing the problem and open the issue. It's me who is thanking you. Thank you to mr1716 as well |
|
Thank you |
Thank you very much for taking the time to troubleshoot this with me. That output is really helpful.
Based on the dry-run, Django is only detecting a change to the
DataFile.hashfield’s validator message (in your output it’s rendered in French: “La longueur doit être de 64 caractères hexadécimaux.”). Changing the configured language/locale should not result in Django thinking a new migration is needed, so this appears to be a NetBox/Django migration serialization issue (i.e., a false-positive “model changes” warning).I was able to reproduce this on my side as well. I’ll open an issue so it can be tracked and propose a fix. In the meantime, you can safely ignore this: it does not affect t…