So it shows the error you share exactly on the following line:
sqlite3.OperationalError: no such table: main.alumnos_materiasalumno__old
There is an error directly with the database, as it says above, it does not find a table ( no such table ), that is, there is no table main.alumnos_materiasalumno__old
By the same token it is certain that you have some error in the migration of the data to the SQLITE Database
Since you are using SQLITE, within the settings.py file where the data of the database is to be used, nothing should be moved, since by default it comes with the necessary data to use SQLITE.
# Database
# https://docs.djangoproject.com/en/2.1/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
The previous code is how it comes by default.
If everything is correct and the same problem remains, I recommend:
- Review each of the models you have created, remember that from these the tables are created with their respective relations in the database (more specifically
main.alumnos_materiasalumno__old
).
- Verify that the migrations touch all the apps that you have in the system and models
On the other hand, when I have had some type of error related to the DB, I have simply deleted it completely to be able to migrate again and I always do the following:
Delete the SQLITE file , inside the main folder of the project there is a file called db.slite3
, which I delete.
Delete all the files in the migration
folder, everything except the __init__.py
file, found in each of the apps you created
Execute the command python manage.py makemigrations
, for migrations of your data
And finally start the command python manage.py migrate
You tell me how you're doing:)