Changes between Initial Version and Version 1 of Ticket #26399


Ignore:
Timestamp:
Mar 23, 2016, 10:44:01 AM (9 years ago)
Author:
Tim Graham
Comment:

It will be easiest to move forward with this if you can submit a pull request with a proposal.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #26399

    • Property Triage Stage UnreviewedAccepted
    • Property Summary Migration refactoring - to facilitate third-party backend integrationRefactor SchemaEditor to facilitate Firebird handlings of column defaults
    • Property Type UncategorizedCleanup/optimization
  • Ticket #26399 – Description

    initial v1  
    11I humbly think that django migration api need a some refactoring to facilitate third-party backend integration.
    22
    3 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.
     3For instance, the [https://github.com/django/django/blob/14e6823d090a077d27f9f7caff2d505db31e55a7/django/db/backends/base/schema.py#L373 SchemaEditor.add_field()] method, 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.
    44
    5 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.
     5Maybe 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.
    66
    7 A disscusion about this en google groups
    8 https://groups.google.com/forum/#!topicsearchin/django-developers/migrations$20firebird/django-developers/yZ0IWGT2qZQ
    9 
    10 ![1] https://github.com/django/django/blob/master/django/db/backends/base/schema.py#L373
     7[https://groups.google.com/d/topic/django-developers/yZ0IWGT2qZQ/discussion A discussion about this on django-developers].
Back to Top