I made a mistake in the database definition When I changed DateField in Models.py to DurationField, an error occurred. So I took the method of recreating the database from scratch. Note. Be careful as the created User and other tables will also disappear. Note 2. There must be a way to change the database on Django, so use that if you can.
The file structure is as follows.
$ls
-project -app -migrations
Lviews.py etc.
Lmanage.py
Lconfig - settings.py etc.
$cd [Path to app]
$rm -d -r migrations/
Delete sqlite file for sqlite I was using PostgreSQL, so I deleted the database directly from PdAdmin4 and recreated the database with the same name.
Recommended Posts