[Fixed]-Django migration error, trying to clean up date field with bad default

1๐Ÿ‘

โœ…

  1. Determine what the default is in the database

    cd /path/to/project
    python manage.py dbshell
    mysql> show create table district_season\G 
    # or for postgres
    # pg_dump -t 'schema.district_season' --schema-only database-name
    
  2. If there is no problem with the type, run the migration with โ€“fake

    ./manage.py migrate district --fake
    

    which will mark the migration as having been run without doing anything to the database.

๐Ÿ‘ค2ps

Leave a comment