Please help me with this error:
File "/Users/ecommerce/proshopvenv/lib/python3.8/site-packages/django/db/backends/utils.py",
line 84, in _execute
return self.cursor.execute(sql, params)
psycopg2.errors.CannotCoerce: cannot cast type date to time without time zone
LINE 1: ..." ALTER COLUMN "createdAt" TYPE time USING "createdAt"::time
The above exception was the direct cause of the following exception:
"a lot of code, and:"
django.db.utils.ProgrammingError: cannot cast type date to time without time zone
LINE 1: ..." ALTER COLUMN "createdAt" TYPE time USING "createdAt"::time
In models i have:
createdAt = models.DateTimeField(auto_now_add=True)
and how i understand from docs https://docs.djangoproject.com/en/3.2/ref/models/fields/
"The auto_now and auto_now_add options will always use the date in the default timezone at the moment of creation or update."
But zone doesn't create, or error in something else, i creating new database, so i can delete all tables
Maybe there is step in django where it initials time zone?
Readed this topic postgreSQL alter column data type to timestamp without time zone and many others but can't fix it to 'migrate' without errors