Changes between Initial Version and Version 3 of Ticket #33187
- Timestamp:
- Oct 11, 2021, 4:52:06 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #33187
- Property Component Uncategorized → Database layer (models, ORM)
- Property Summary Foreign key to a specific field is not handled in inspected → Foreign key to a specific field is not handled in inspectdb
- Property Type Uncategorized → Bug
-
Ticket #33187 – Description
initial v3 1 1 if you have a DB like that 2 2 3 {{{#!sql 3 4 CREATE TABLE foo ( id serial primary key, other_id int UNIQUE); 4 5 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 6 CREATE TABLE bar ( 7 id serial primary key, other_id int, 8 constraint myconst 9 FOREIGN KEY(other_id) references foo(other_id) 10 ); 11 }}} 10 12 11 13 the generated model for the bar table will have the other_id be a FK to foo and not foo(other_id).