Changes between Initial Version and Version 1 of Ticket #11964, comment 36


Ignore:
Timestamp:
Oct 18, 2018, 10:12:44 AM (6 years ago)
Author:
Scott Stevens

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11964, comment 36

    initial v1  
    11It appears that adding multiple constraints to a table results in only the last being stored.
    22
    3 Reviewing the SQL (`./manage.py migrate`), I'm seeing each constraint being added by way of `ALTER TABLE`, `CREATE TABLE`, `INSERT INTO ... SELECT`, `DROP TABLE`, however only the most recent constraint is added each time, so the previous constraint is dropped with the old table when adding the new one.
     3Reviewing the SQL (`./manage.py sqlmigrate`), I'm seeing each constraint being added by way of `ALTER TABLE`, `CREATE TABLE`, `INSERT INTO ... SELECT`, `DROP TABLE`, however only the most recent constraint is added each time, so the previous constraint is dropped with the old table when adding the new one.
    44
    55Using `38f3de86bd0bfa4c9b57db1237fa55e9fa88bc6e`, Python 3.6.6 (Win10x64) with SQLite database.
Back to Top