Changes between Initial Version and Version 3 of Ticket #33187


Ignore:
Timestamp:
Oct 11, 2021, 4:52:06 AM (3 years ago)
Author:
Tim Graham
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #33187

    • Property Component UncategorizedDatabase layer (models, ORM)
    • Property Summary Foreign key to a specific field is not handled in inspectedForeign key to a specific field is not handled in inspectdb
    • Property Type UncategorizedBug
  • Ticket #33187 – Description

    initial v3  
    11if you have a DB like that
    22
     3{{{#!sql
    34CREATE TABLE foo ( id serial primary key, other_id int UNIQUE);
    45
    5 CREATE TABLE bar ( id serial primary key, other_id int,
    6                                                                   constraint myconst
    7                                                                    FOREIGN KEY(other_id) references foo(other_id)
    8                                                                   );
    9 
     6CREATE TABLE bar (
     7    id serial primary key, other_id int,
     8    constraint myconst
     9    FOREIGN KEY(other_id) references foo(other_id)
     10);
     11}}}
    1012
    1113the generated model for the bar table will have the other_id be a FK to foo and not foo(other_id).
Back to Top