Django Migrate Fails due to Type Conflict
Here is my Chapter model code: class Chapter(models.Model): name = models.CharField(max_length=180) is_canon = models.BooleanField(default=True) series_id = models.ForeignKey('Series', on_delete=models.CASCADE, blank=True, null=True) def __str__(self): return self.name When running python3 manage.py makemigrations, I provided a one off value of 'NULL' for the new field series_id in order to populate existing rows, when I should have backed out and added blank=True, null=True to the definition, as it is now in the code provided above. So, now, I want to run python3 manage.py migrate, but of course the migration fails because I've got a bunch of 'NULL' strings in places where django is expecting actual NULL values/integer values. How to I get rid of those 'NULL' values and reset things so I can migrate? Thank you for your time.
Adding to Pythonista comment. You could roll back to the previous migration. Delete the migration file and create it once again. That is the cleanest way in my opinion.
Using converters in Pandas read_hdf similar to read_csv
python3 package path of local file
Viewing other user profile
Python Tkinter, Stop a threading function
Python runtime warning when move unit test to a package
UserWarning on Django website for Raven client
Organise .rst files for sphinx?
Scatter Plot of a Specific Column in Python using matplotlib
How to make difference between email html body and html attachment in python?
Cobb-Douglas maximization in python
Django won't serve some static files
Flask return SUM into Jinja2 list
i tried this sql request on python but is not working
Passing command line arguments in python by pytest
Not using grid anywhere in class still gives error 'cannot use geometry manager pack inside . which already has slaves managed by grid' in tkinter
Minimax Alogrithm for TicTacToe [python]