今天,在把model中一个Timefield修改为DateTimefield时遇到了一个问题
再重新迁移,生成数据库的时候
django.db.utils.ProgrammingError: cannot cast type time without time zone to timestamp with time zone
LINE 1: ... TYPE timestamp with time zone USING "Create_Time"::timestam...
我一开始以为是我连接pgsql的原因,后来把原来的数据库和migration的文件都删了,就好了。
参考
https://stackoverflow.com/questions/68826467/django-programming-cannot-cast-time-without-time-zone-to-timestamp