• 
      

    Add compatibility functions for working with database routers.

    Review Request #9550 — Created Jan. 28, 2018 and submitted

    Information

    Django Evolution
    master
    ad50151...

    Reviewers

    We check the database router in order to determine if we want to handle
    evolutions for a particular model. The code that does this today checks
    for certain attributes on the router and then calls a function. However,
    this isn't quite good enough, as the function signature even for
    Django's migrations capability has changed twice.

    We now have a couple compatibility functions that check whether models
    are allowed to migrate (Django >= 1.7) or be synced to the database
    (Django <= 1.6). These handle the different function signatures we have
    to deal with.

    Unit tests are not added in this change, but will be here as part of a
    set of signature function test rewrites.

    Unit tests pass on supported versions of Django.

    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to master (1aee097)