Source code deployment: Data disappears after migration on restart, Docker persistence issue. How to import previous data?

When I deploy from source code, every restart requires data migration, and after migration, the data disappears. What’s going on? I’d like to ask, restarting Docker doesn’t achieve data persistence. How can I import the previous data for the next deployment? Every time I restart Docker, I get this error, but as long as I migrate the data, there’s no error. I don’t know why.

Modified,