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

Missing customer_id in the diagram #62

Closed vadim-tropashko closed 7 months ago

vadim-tropashko commented 7 months ago

Input:

customers
    name vc40
    customer_addresses /cascade
        street vc40
        city vc40
        state vc2
        zip_code vc10

orders
    total num
    customer /fk customers

products
    name vc40

order_lines
    order_id /fk orders
    product /fk products
    quantity num

Output:

{
  name: "customer_addresses",
  schema: null,
  columns: [
    {
      name: "id",
      datatype: "number",
    },
    {
      name: "street",
      datatype: "varchar2(40)",
    },
    {
      name: "city",
      datatype: "varchar2(40)",
    },
    {
      name: "state",
      datatype: "varchar2(2)",
    },
    {
      name: "zip_code",
      datatype: "varchar2(10)",
    },
  ],
}