#25002: Postgresql migration fails when changing a CharField to a TimeField -------------------------------------+------------------------------------- Reporter: dirkcuys | Owner: charettes Type: Bug | Status: assigned Component: Database layer | Version: 1.8 (models, ORM) | Severity: Normal | Resolution: Keywords: migrations | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 1 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by charettes):
* owner: nobody => charettes * status: new => assigned * easy: 0 => 1 * stage: Unreviewed => Accepted Comment: I'm not sure this qualify as a bug or an enhancement but a simple fix would be to set `DatabaseSchemaEditor.sql_alter_column_type = "ALTER COLUMN %(column)s TYPE %(type)s USING %(column)s::%(type)s"`. I'll submit a tentative PR to run the full test suite against CI before adding a test. -- Ticket URL: <https://code.djangoproject.com/ticket/25002#comment:3> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/066.cd57eca0d07adcbd4eaef4ab27acbcad%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.