Skip to content
  • Vladimir Mencl's avatar
    South migrations: improve #4 PostgreSQL workaround · 28f60f62
    Vladimir Mencl authored
    The original fix to the PostgreSQL issue with south migration 0022 did correctly change the field type, but did not add the Foreign Key constraint.
    
    Improve the workaround 9a2924d5 by also adding the foreign key constraint.
    
    For databases created with the original workaround, the foreign key constraint can be added manually with:
    
        ALTER TABLE edumanage_instrealmmon ADD CONSTRAINT "edumanage_i_realm_id_24cc89d4be4145e5_fk_edumanage_instrealm_id" FOREIGN KEY (realm_id) REFERENCES edumanage_instrealm(id) DEFERRABLE INITIALLY DEFERRED;
    
    Note that not having the constraint in does not directly break anything, but
    could lead to corrupt databases and the database structure is reported
    differently with:
    
        ./manage.py inspectdb
    28f60f62