#26399: Migration refactoring - to facilitate third-party backend integration
-------------------------------+--------------------
     Reporter:  maxirobaina    |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Migrations     |    Version:  master
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 I humbly think that django migration api need a some refactoring to
 facilitate third-party backend integration.

 For instance, add_field method ![1], if I try to delete a default value on
 a column that does not have a previous default value definition I get an
 error on firebird, for which reason, I need to check if that field has got
 defined a default value before. Then I need to rewrite the whole add_field
 method too.

 Maybe a possible approach would be to have sql templates
 (sql_alter_column_default, sql_alter_column_no_default, etc) as methods,
 instead of class attributes.

 A disscusion about this en google groups
 https://groups.google.com/forum/#!topicsearchin/django-
 developers/migrations$20firebird/django-developers/yZ0IWGT2qZQ

 ![1]
 
https://github.com/django/django/blob/master/django/db/backends/base/schema.py#L373

--
Ticket URL: <https://code.djangoproject.com/ticket/26399>
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/054.c1a0fb746500bc571eadfc04e97fb4e9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to