oracle / quicksql

A library for generating DDL SQL and entity-relationship-diagrams from Quick SQL code
Universal Permissive License v1.0
53 stars 11 forks source link

Bug 35950582 - /INSERT GENERATES EXTRA FK COLUMN #4

Closed vadim-tropashko closed 1 year ago

vadim-tropashko commented 1 year ago

quicksql input producing the wrong insert statement with an extra column:

team_members
   username
projects /insert 10
   name
   project_lead /nn /references team_members

It generates the following insert statement (I ignored the before and after, as just want to focus on the insert that is broken):

...
insert into projects (
    id,
    team_member_id,
    name,
    project_lead
) values (
    1,
    94,
    'Augusta Wilkerson',
    'N/A'
);
...

Please note there is an extra generated column called team_member_id. project_lead is the fk, and should have the random IDs, and team_member_id should not be there.