Changes between Initial Version and Version 2 of Ticket #28573


Ignore:
Timestamp:
Sep 25, 2017, 11:31:24 AM (7 years ago)
Author:
Tim Graham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #28573 – Description

    initial v2  
    44
    55Putting aside most of it; when running it, I was getting the following error:
    6 
     6{{{
    77    django.db.utils.ProgrammingError: column "customer_from_source_id" does not exist
    8 
     8}}}
    99That was very confusing, but when debugging it I found out that it's choking all the way at the end on the following sql statement:
    1010
     
    1212
    1313Now, that's weird because it shouldn't be creating that index on "customer_from_source_id" but on "customer_id" instead. The field is first created like so:
    14 
     14{{{
    1515        migrations.AddField(
    1616            model_name="card",
     
    1818            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name="sources", to="djstripe.Customer"),
    1919        ),
    20 
     20}}}
    2121Then, it is renamed:
    22 
     22{{{
    2323        migrations.RenameField(
    2424            model_name="card",
     
    2626            new_name="customer",
    2727        ),
     28}}}
Back to Top