from django.db.models.functions import Trunc, TruncDate code example
Example: TYPE INTEGER USING EXTRACT django
migrations.RunSQL("ALTER TABLE mytable ALTER end_date_fixed TYPE INTEGER USING EXTRACT(epoch FROM end_date_fixed)
migrations.RunSQL("ALTER TABLE mytable ALTER end_date_fixed TYPE INTEGER USING EXTRACT(epoch FROM end_date_fixed)