i use render to deploy my project , first i create a database on render then a web service .
i connect them with the database internal url . it works fine , but i have a big annoying problem : each time i deploy a new commit or the api endpoint is reloaded from the browser , all the data stored in the database is deleted …
Render instances have an ephemeral filesystem, meaning any file written to the instance after it has booted will be lost when it next restarts (e.g. spun down if on free instance type, next deploy, manual restart, etc.).
If you’re using SQLite on your service, you’ll need to have a persistent store, a Render Disk (which is chargeable and also requires a paid instance type).
However, your code snippet shows you have a conditional on DEBUG, is that set correctly?
DEBUG = os.getenv(‘DEBUG’) , here is it and i pass False in the enviroment variable on server
, i use database postgres created on render not sqlite as i do in the development phase
We’re getting deeper into general code debugging here, and not a direct Render issue, which is beyond the scope of our support.
Maybe other community members will be able to assist, or Googling the error (“django InconsistentMigrationHistory”) will likely bring up possible causes/solutions.