{
  "$schema": "mantara.schema.v1",
  "system_name": "ASN Workflow",
  "schema_name": "sch_20260506_093323_f9054447f7d34ec2",
  "description": "A logistics application for managing Advanced Shipment Notices and related operations.",
  "menus": [
    {
      "menu_id": 1,
      "menu_name": "Core Operations",
      "sequence_number": 1,
      "description": "Manage core logistics operations.",
      "submenus": [
        {
          "submenu_id": 101,
          "submenu_name": "Advanced Shipment Notice Master",
          "sequence_number": 1,
          "description": "Manage Advanced Shipment Notices.",
          "tables": [
            {
              "table_name": "advanced_shipment_notice",
              "comment": "An ASN sent by a supplier announcing inbound goods. Rule all_skus_reserved: All SKUs must be reserved before moving to Reserved state. Rule all_skus_processed: All SKUs must be processed before ASN can be marked as completed. Rule door_assignment_required: A door must be assigned before ASN can move to 'At Door' state. Rule asn_creation_methods: ASN can be created in two ways: Standard ASN via Purchase Orders or Local ASN based on Vendor.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 101 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "asn_id",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE",
                  "comment": "was: asnId"
                },
                {
                  "name": "supplier_id",
                  "type": "UUID",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.cfg_advanced_shipment_notice_status(cfg_advanced_shipment_notice_status_id)",
                  "comment": "FK to cfg_advanced_shipment_notice_status(cfg_advanced_shipment_notice_status_id)"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": [
                {
                  "column": "supplier_id",
                  "references": "sch_20260506_093323_f9054447f7d34ec2.supplier(id)"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 102,
          "submenu_name": "Receiving Confirmation Report Master",
          "sequence_number": 2,
          "description": "Manage Receiving Confirmation Reports.",
          "tables": [
            {
              "table_name": "receiving_confirmation_report",
              "comment": "Document generated after ASN closure. Rule rcr_print_after_closure: RCR can only be printed after ASN is closed.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 102 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "rcr_id",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL",
                  "comment": "was: rcrId"
                },
                {
                  "name": "sku_details",
                  "type": "JSONB",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "vendor_details",
                  "type": "JSONB",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 103,
          "submenu_name": "Local Asn Master",
          "sequence_number": 3,
          "description": "Manage Local ASNs.",
          "tables": [
            {
              "table_name": "local_asn",
              "comment": "ASN created based on Vendor.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 103 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "vendor_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL",
                  "comment": "was: vendorNumber"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        }
      ]
    },
    {
      "menu_id": 2,
      "menu_name": "Master Data & Catalog",
      "sequence_number": 2,
      "description": "Manage master data and catalog entries.",
      "submenus": [
        {
          "submenu_id": 201,
          "submenu_name": "Asn Line Item Master",
          "sequence_number": 1,
          "description": "Manage ASN Line Items.",
          "tables": [
            {
              "table_name": "asn_line_item",
              "comment": "Line items within an ASN. Rule min_one_line_item: An ASN must contain at least one line item before it can be submitted.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 201 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "po_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL",
                  "comment": "was: poNumber"
                },
                {
                  "name": "upc_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL",
                  "comment": "was: upcNumber"
                },
                {
                  "name": "sku",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "quantity",
                  "type": "INT",
                  "constraints": "NOT NULL CHECK (quantity > 0)"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": [
                {
                  "column": "asn_id",
                  "references": "sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice(id)"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 202,
          "submenu_name": "Supplier Master",
          "sequence_number": 2,
          "description": "Manage Suppliers.",
          "tables": [
            {
              "table_name": "supplier",
              "comment": "Entity representing suppliers providing goods.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 202 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260506_093323_f9054447f7d34ec2.cfg_supplier_status(cfg_supplier_status_id)",
                  "comment": "Auto-injected: archetype_default"
                },
                {
                  "name": "supplier_id",
                  "type": "UUID",
                  "constraints": "NOT NULL UNIQUE",
                  "comment": "was: supplierId"
                },
                {
                  "name": "supplier_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL",
                  "comment": "was: supplierName"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 203,
          "submenu_name": "Standard Asn Master",
          "sequence_number": 3,
          "description": "Manage Standard ASNs.",
          "tables": [
            {
              "table_name": "standard_asn",
              "comment": "ASN created via Purchase Orders.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 203 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "po_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL",
                  "comment": "was: poNumber"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        }
      ]
    },
    {
      "menu_id": 3,
      "menu_name": "Reports & History",
      "sequence_number": 3,
      "description": "Access reports and historical data.",
      "submenus": [
        {
          "submenu_id": 301,
          "submenu_name": "Door Master Master",
          "sequence_number": 1,
          "description": "Manage Door Assignments.",
          "tables": [
            {
              "table_name": "door_master",
              "comment": "Master table for door assignments.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 301 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "door_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL",
                  "comment": "was: doorNumber"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 302,
          "submenu_name": "Advanced Shipment Notice History",
          "sequence_number": 2,
          "description": "View history of Advanced Shipment Notices.",
          "tables": [
            {
              "table_name": "advanced_shipment_notice_history",
              "comment": "History of changes to Advanced Shipment Notices.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 302 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "asn_id",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.cfg_advanced_shipment_notice_status(cfg_advanced_shipment_notice_status_id)",
                  "comment": "FK to cfg_advanced_shipment_notice_status(cfg_advanced_shipment_notice_status_id)"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 303,
          "submenu_name": "Asn Line Item History",
          "sequence_number": 3,
          "description": "View history of ASN Line Items.",
          "tables": [
            {
              "table_name": "asn_line_item_history",
              "comment": "History of changes to ASN Line Items.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 303 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "po_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 304,
          "submenu_name": "Door Master History",
          "sequence_number": 4,
          "description": "View history of Door Assignments.",
          "tables": [
            {
              "table_name": "door_master_history",
              "comment": "History of changes to Door Assignments.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 304 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "door_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 305,
          "submenu_name": "Receiving Confirmation Report History",
          "sequence_number": 5,
          "description": "View history of Receiving Confirmation Reports.",
          "tables": [
            {
              "table_name": "receiving_confirmation_report_history",
              "comment": "History of changes to Receiving Confirmation Reports.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 305 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "rcr_id",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 306,
          "submenu_name": "Supplier History",
          "sequence_number": 6,
          "description": "View history of Suppliers.",
          "tables": [
            {
              "table_name": "supplier_history",
              "comment": "History of changes to Suppliers.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 306 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "supplier_id",
                  "type": "UUID",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 307,
          "submenu_name": "Standard Asn History",
          "sequence_number": 7,
          "description": "View history of Standard ASNs.",
          "tables": [
            {
              "table_name": "standard_asn_history",
              "comment": "History of changes to Standard ASNs.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 307 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "po_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 308,
          "submenu_name": "Local Asn History",
          "sequence_number": 8,
          "description": "View history of Local ASNs.",
          "tables": [
            {
              "table_name": "local_asn_history",
              "comment": "History of changes to Local ASNs.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 308 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "vendor_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        }
      ]
    },
    {
      "menu_id": 4,
      "menu_name": "User Management",
      "sequence_number": 4,
      "description": "Manage users and roles.",
      "submenus": [
        {
          "submenu_id": 401,
          "submenu_name": "User Directory",
          "sequence_number": 1,
          "description": "Manage user accounts.",
          "tables": [
            {
              "table_name": "users",
              "comment": "Stores user account information.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 401 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260506_093323_f9054447f7d34ec2.cfg_users_status(cfg_users_status_id)",
                  "comment": "Auto-injected: archetype_default"
                },
                {
                  "name": "username",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "password_hash",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL",
                  "comment": "Stores bcrypt hash, never plain text"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 402,
          "submenu_name": "Roles & Permissions",
          "sequence_number": 2,
          "description": "Manage roles and permissions.",
          "tables": [
            {
              "table_name": "roles",
              "comment": "Stores role information.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 402 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260506_093323_f9054447f7d34ec2.cfg_roles_status(cfg_roles_status_id)",
                  "comment": "Auto-injected: archetype_default"
                },
                {
                  "name": "role_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            },
            {
              "table_name": "permissions",
              "comment": "Stores permission information.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 402 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260506_093323_f9054447f7d34ec2.cfg_permissions_status(cfg_permissions_status_id)",
                  "comment": "Auto-injected: archetype_default"
                },
                {
                  "name": "permission_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        }
      ]
    },
    {
      "menu_id": 5,
      "menu_name": "Notifications & Audit",
      "sequence_number": 5,
      "description": "Manage notifications and audit logs.",
      "submenus": [
        {
          "submenu_id": 501,
          "submenu_name": "Notifications",
          "sequence_number": 1,
          "description": "Manage system notifications.",
          "tables": [
            {
              "table_name": "notifications",
              "comment": "Stores system notifications.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 501 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "message",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 502,
          "submenu_name": "Audit Log",
          "sequence_number": 2,
          "description": "View audit logs.",
          "tables": [
            {
              "table_name": "audit_log",
              "comment": "Stores audit log entries.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 502 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "action",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "timestamp",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "version",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1",
                  "comment": "Optimistic-concurrency version counter"
                },
                {
                  "name": "notes",
                  "type": "TEXT",
                  "constraints": "",
                  "comment": "Free-form operator notes"
                },
                {
                  "name": "metadata",
                  "type": "JSONB",
                  "constraints": "",
                  "comment": "Variable-shape extension payload"
                },
                {
                  "name": "deleted_at",
                  "type": "TIMESTAMP",
                  "constraints": "",
                  "comment": "Soft-delete marker (NULL = not deleted)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        }
      ]
    },
    {
      "menu_id": 6,
      "menu_name": "Configuration",
      "sequence_number": 6,
      "description": "Manage system configurations and settings.",
      "submenus": [
        {
          "submenu_id": 601,
          "submenu_name": "System Configuration",
          "sequence_number": 1,
          "description": "Manage system-wide settings.",
          "tables": [
            {
              "table_name": "system_settings",
              "comment": "Stores system-wide configuration settings.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 601 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 602,
          "submenu_name": "Advanced Shipment Notice Settings",
          "sequence_number": 2,
          "description": "Manage settings for Advanced Shipment Notices.",
          "tables": [
            {
              "table_name": "advanced_shipment_notice_settings",
              "comment": "Stores settings specific to Advanced Shipment Notices.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 602 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 603,
          "submenu_name": "Asn Line Item Settings",
          "sequence_number": 3,
          "description": "Manage settings for ASN Line Items.",
          "tables": [
            {
              "table_name": "asn_line_item_settings",
              "comment": "Stores settings specific to ASN Line Items.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 603 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 604,
          "submenu_name": "Door Master Settings",
          "sequence_number": 4,
          "description": "Manage settings for Door Assignments.",
          "tables": [
            {
              "table_name": "door_master_settings",
              "comment": "Stores settings specific to Door Assignments.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 604 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 605,
          "submenu_name": "Receiving Confirmation Report Settings",
          "sequence_number": 5,
          "description": "Manage settings for Receiving Confirmation Reports.",
          "tables": [
            {
              "table_name": "receiving_confirmation_report_settings",
              "comment": "Stores settings specific to Receiving Confirmation Reports.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 605 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 606,
          "submenu_name": "Supplier Settings",
          "sequence_number": 6,
          "description": "Manage settings for Suppliers.",
          "tables": [
            {
              "table_name": "supplier_settings",
              "comment": "Stores settings specific to Suppliers.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 606 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 607,
          "submenu_name": "Standard Asn Settings",
          "sequence_number": 7,
          "description": "Manage settings for Standard ASNs.",
          "tables": [
            {
              "table_name": "standard_asn_settings",
              "comment": "Stores settings specific to Standard ASNs.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 607 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 608,
          "submenu_name": "Local Asn Settings",
          "sequence_number": 8,
          "description": "Manage settings for Local ASNs.",
          "tables": [
            {
              "table_name": "local_asn_settings",
              "comment": "Stores settings specific to Local ASNs.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 608 NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 609,
          "submenu_name": "Cfg Advanced Shipment Notice Status",
          "sequence_number": 9,
          "description": "Status values for Advanced Shipment Notices.",
          "tables": [
            {
              "table_name": "cfg_advanced_shipment_notice_status",
              "comment": "Status values for Advanced Shipment Notices.",
              "columns": [
                {
                  "name": "cfg_advanced_shipment_notice_status_id",
                  "type": "SERIAL",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "code",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "label",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "is_active",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT TRUE"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 609 REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "unreserved",
                "reserved",
                "at door",
                "closed"
              ]
            }
          ]
        },
        {
          "submenu_id": 610,
          "submenu_name": "Supplier Status",
          "sequence_number": 10,
          "description": "Configurable status values for supplier",
          "tables": [
            {
              "table_name": "cfg_supplier_status",
              "comment": "Status lookup for supplier. Generic placeholder seeds \u2014 operator may customise via admin UI.",
              "columns": [
                {
                  "name": "cfg_supplier_status_id",
                  "type": "SERIAL",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "code",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "label",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "is_active",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT TRUE"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 610 REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 611,
          "submenu_name": "Users Status",
          "sequence_number": 11,
          "description": "Configurable status values for users",
          "tables": [
            {
              "table_name": "cfg_users_status",
              "comment": "Status lookup for users. Generic placeholder seeds \u2014 operator may customise via admin UI.",
              "columns": [
                {
                  "name": "cfg_users_status_id",
                  "type": "SERIAL",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "code",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "label",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "is_active",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT TRUE"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 611 REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 612,
          "submenu_name": "Roles Status",
          "sequence_number": 12,
          "description": "Configurable status values for roles",
          "tables": [
            {
              "table_name": "cfg_roles_status",
              "comment": "Status lookup for roles. Generic placeholder seeds \u2014 operator may customise via admin UI.",
              "columns": [
                {
                  "name": "cfg_roles_status_id",
                  "type": "SERIAL",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "code",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "label",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "is_active",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT TRUE"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 612 REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 613,
          "submenu_name": "Permissions Status",
          "sequence_number": 13,
          "description": "Configurable status values for permissions",
          "tables": [
            {
              "table_name": "cfg_permissions_status",
              "comment": "Status lookup for permissions. Generic placeholder seeds \u2014 operator may customise via admin UI.",
              "columns": [
                {
                  "name": "cfg_permissions_status_id",
                  "type": "SERIAL",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "code",
                  "type": "VARCHAR(50)",
                  "constraints": "NOT NULL UNIQUE"
                },
                {
                  "name": "label",
                  "type": "VARCHAR(100)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "description",
                  "type": "TEXT"
                },
                {
                  "name": "is_active",
                  "type": "BOOLEAN",
                  "constraints": "NOT NULL DEFAULT TRUE"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 613 REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 614,
          "submenu_name": "Users History",
          "sequence_number": 14,
          "description": "Audit history for users",
          "tables": [
            {
              "table_name": "users_history",
              "comment": "Append-only audit trail for users.",
              "columns": [
                {
                  "name": "id",
                  "type": "SERIAL",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 614 REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "users_id",
                  "type": "INT",
                  "constraints": "NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.users(id)",
                  "comment": "FK to users"
                },
                {
                  "name": "change_type",
                  "type": "VARCHAR(30)",
                  "constraints": "NOT NULL CHECK (change_type IN ('CREATE','UPDATE','DELETE'))",
                  "comment": "Type of change"
                },
                {
                  "name": "change_details",
                  "type": "JSONB",
                  "constraints": "NOT NULL",
                  "comment": "Full snapshot of changed fields"
                },
                {
                  "name": "changed_by",
                  "type": "INT",
                  "constraints": "",
                  "comment": "Actor user id (FK added later if users table exists)"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "ip_address",
                  "type": "INET",
                  "constraints": "",
                  "comment": "Source IP of the change"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 615,
          "submenu_name": "Roles History",
          "sequence_number": 15,
          "description": "Audit history for roles",
          "tables": [
            {
              "table_name": "roles_history",
              "comment": "Append-only audit trail for roles.",
              "columns": [
                {
                  "name": "id",
                  "type": "SERIAL",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 615 REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "roles_id",
                  "type": "INT",
                  "constraints": "NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.roles(id)",
                  "comment": "FK to roles"
                },
                {
                  "name": "change_type",
                  "type": "VARCHAR(30)",
                  "constraints": "NOT NULL CHECK (change_type IN ('CREATE','UPDATE','DELETE'))",
                  "comment": "Type of change"
                },
                {
                  "name": "change_details",
                  "type": "JSONB",
                  "constraints": "NOT NULL",
                  "comment": "Full snapshot of changed fields"
                },
                {
                  "name": "changed_by",
                  "type": "INT",
                  "constraints": "",
                  "comment": "Actor user id (FK added later if users table exists)"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "ip_address",
                  "type": "INET",
                  "constraints": "",
                  "comment": "Source IP of the change"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 616,
          "submenu_name": "Permissions History",
          "sequence_number": 16,
          "description": "Audit history for permissions",
          "tables": [
            {
              "table_name": "permissions_history",
              "comment": "Append-only audit trail for permissions.",
              "columns": [
                {
                  "name": "id",
                  "type": "SERIAL",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 616 REFERENCES sch_20260506_093323_f9054447f7d34ec2.submenu(submenu_id)"
                },
                {
                  "name": "permissions_id",
                  "type": "INT",
                  "constraints": "NOT NULL REFERENCES sch_20260506_093323_f9054447f7d34ec2.permissions(id)",
                  "comment": "FK to permissions"
                },
                {
                  "name": "change_type",
                  "type": "VARCHAR(30)",
                  "constraints": "NOT NULL CHECK (change_type IN ('CREATE','UPDATE','DELETE'))",
                  "comment": "Type of change"
                },
                {
                  "name": "change_details",
                  "type": "JSONB",
                  "constraints": "NOT NULL",
                  "comment": "Full snapshot of changed fields"
                },
                {
                  "name": "changed_by",
                  "type": "INT",
                  "constraints": "",
                  "comment": "Actor user id (FK added later if users table exists)"
                },
                {
                  "name": "change_date",
                  "type": "TIMESTAMP",
                  "constraints": "NOT NULL DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "ip_address",
                  "type": "INET",
                  "constraints": "",
                  "comment": "Source IP of the change"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMP",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        }
      ]
    }
  ],
  "enum_types": [],
  "assumptions": [
    "Each menu and submenu is designed to handle specific business operations or data management tasks.",
    "The system will use UUIDs for primary keys to ensure uniqueness across distributed systems.",
    "The system will use VARCHAR(30) for status fields to allow for future expansion of status values."
  ],
  "open_questions": [
    "Clarification needed on the specific roles and permissions for each user action.",
    "Details on how the system should handle historical data and settings changes are required."
  ],
  "_indexes": [
    "CREATE INDEX idx_advanced_shipment_notice_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice(submenu_id);",
    "CREATE INDEX idx_advanced_shipment_notice_asn_id ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice(asn_id);",
    "CREATE INDEX idx_advanced_shipment_notice_supplier_id ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice(supplier_id);",
    "CREATE INDEX idx_advanced_shipment_notice_status_id ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice(status_id);",
    "CREATE INDEX idx_advanced_shipment_notice_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice(deleted_at);",
    "CREATE INDEX idx_advanced_shipment_notice_created_at ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice(created_at);",
    "CREATE INDEX idx_advanced_shipment_notice_updated_at ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice(updated_at);",
    "CREATE INDEX idx_receiving_confirmation_report_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report(submenu_id);",
    "CREATE INDEX idx_receiving_confirmation_report_rcr_id ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report(rcr_id);",
    "CREATE INDEX idx_receiving_confirmation_report_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report(deleted_at);",
    "CREATE INDEX idx_receiving_confirmation_report_created_at ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report(created_at);",
    "CREATE INDEX idx_receiving_confirmation_report_updated_at ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report(updated_at);",
    "CREATE INDEX idx_local_asn_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.local_asn(submenu_id);",
    "CREATE INDEX idx_local_asn_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.local_asn(deleted_at);",
    "CREATE INDEX idx_local_asn_created_at ON sch_20260506_093323_f9054447f7d34ec2.local_asn(created_at);",
    "CREATE INDEX idx_local_asn_updated_at ON sch_20260506_093323_f9054447f7d34ec2.local_asn(updated_at);",
    "CREATE INDEX idx_asn_line_item_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item(submenu_id);",
    "CREATE INDEX idx_asn_line_item_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item(deleted_at);",
    "CREATE INDEX idx_asn_line_item_created_at ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item(created_at);",
    "CREATE INDEX idx_asn_line_item_updated_at ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item(updated_at);",
    "CREATE INDEX idx_supplier_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.supplier(submenu_id);",
    "CREATE INDEX idx_supplier_status_id ON sch_20260506_093323_f9054447f7d34ec2.supplier(status_id);",
    "CREATE INDEX idx_supplier_supplier_id ON sch_20260506_093323_f9054447f7d34ec2.supplier(supplier_id);",
    "CREATE INDEX idx_supplier_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.supplier(deleted_at);",
    "CREATE INDEX idx_supplier_created_at ON sch_20260506_093323_f9054447f7d34ec2.supplier(created_at);",
    "CREATE INDEX idx_supplier_updated_at ON sch_20260506_093323_f9054447f7d34ec2.supplier(updated_at);",
    "CREATE INDEX idx_standard_asn_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.standard_asn(submenu_id);",
    "CREATE INDEX idx_standard_asn_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.standard_asn(deleted_at);",
    "CREATE INDEX idx_standard_asn_created_at ON sch_20260506_093323_f9054447f7d34ec2.standard_asn(created_at);",
    "CREATE INDEX idx_standard_asn_updated_at ON sch_20260506_093323_f9054447f7d34ec2.standard_asn(updated_at);",
    "CREATE INDEX idx_door_master_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.door_master(submenu_id);",
    "CREATE INDEX idx_door_master_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.door_master(deleted_at);",
    "CREATE INDEX idx_door_master_created_at ON sch_20260506_093323_f9054447f7d34ec2.door_master(created_at);",
    "CREATE INDEX idx_door_master_updated_at ON sch_20260506_093323_f9054447f7d34ec2.door_master(updated_at);",
    "CREATE INDEX idx_advanced_shipment_notice_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice_history(submenu_id);",
    "CREATE INDEX idx_advanced_shipment_notice_history_asn_id ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice_history(asn_id);",
    "CREATE INDEX idx_advanced_shipment_notice_history_status_id ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice_history(status_id);",
    "CREATE INDEX idx_advanced_shipment_notice_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice_history(created_at);",
    "CREATE INDEX idx_advanced_shipment_notice_history_updated_at ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice_history(updated_at);",
    "CREATE INDEX idx_asn_line_item_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item_history(submenu_id);",
    "CREATE INDEX idx_asn_line_item_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item_history(created_at);",
    "CREATE INDEX idx_asn_line_item_history_updated_at ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item_history(updated_at);",
    "CREATE INDEX idx_door_master_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.door_master_history(submenu_id);",
    "CREATE INDEX idx_door_master_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.door_master_history(created_at);",
    "CREATE INDEX idx_door_master_history_updated_at ON sch_20260506_093323_f9054447f7d34ec2.door_master_history(updated_at);",
    "CREATE INDEX idx_receiving_confirmation_report_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report_history(submenu_id);",
    "CREATE INDEX idx_receiving_confirmation_report_history_rcr_id ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report_history(rcr_id);",
    "CREATE INDEX idx_receiving_confirmation_report_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report_history(created_at);",
    "CREATE INDEX idx_receiving_confirmation_report_history_updated_at ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report_history(updated_at);",
    "CREATE INDEX idx_supplier_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.supplier_history(submenu_id);",
    "CREATE INDEX idx_supplier_history_supplier_id ON sch_20260506_093323_f9054447f7d34ec2.supplier_history(supplier_id);",
    "CREATE INDEX idx_supplier_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.supplier_history(created_at);",
    "CREATE INDEX idx_supplier_history_updated_at ON sch_20260506_093323_f9054447f7d34ec2.supplier_history(updated_at);",
    "CREATE INDEX idx_standard_asn_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.standard_asn_history(submenu_id);",
    "CREATE INDEX idx_standard_asn_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.standard_asn_history(created_at);",
    "CREATE INDEX idx_standard_asn_history_updated_at ON sch_20260506_093323_f9054447f7d34ec2.standard_asn_history(updated_at);",
    "CREATE INDEX idx_local_asn_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.local_asn_history(submenu_id);",
    "CREATE INDEX idx_local_asn_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.local_asn_history(created_at);",
    "CREATE INDEX idx_local_asn_history_updated_at ON sch_20260506_093323_f9054447f7d34ec2.local_asn_history(updated_at);",
    "CREATE INDEX idx_users_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.users(submenu_id);",
    "CREATE INDEX idx_users_status_id ON sch_20260506_093323_f9054447f7d34ec2.users(status_id);",
    "CREATE INDEX idx_users_username ON sch_20260506_093323_f9054447f7d34ec2.users(username);",
    "CREATE INDEX idx_users_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.users(deleted_at);",
    "CREATE INDEX idx_users_created_at ON sch_20260506_093323_f9054447f7d34ec2.users(created_at);",
    "CREATE INDEX idx_users_updated_at ON sch_20260506_093323_f9054447f7d34ec2.users(updated_at);",
    "CREATE INDEX idx_roles_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.roles(submenu_id);",
    "CREATE INDEX idx_roles_status_id ON sch_20260506_093323_f9054447f7d34ec2.roles(status_id);",
    "CREATE INDEX idx_roles_role_name ON sch_20260506_093323_f9054447f7d34ec2.roles(role_name);",
    "CREATE INDEX idx_roles_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.roles(deleted_at);",
    "CREATE INDEX idx_roles_created_at ON sch_20260506_093323_f9054447f7d34ec2.roles(created_at);",
    "CREATE INDEX idx_roles_updated_at ON sch_20260506_093323_f9054447f7d34ec2.roles(updated_at);",
    "CREATE INDEX idx_permissions_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.permissions(submenu_id);",
    "CREATE INDEX idx_permissions_status_id ON sch_20260506_093323_f9054447f7d34ec2.permissions(status_id);",
    "CREATE INDEX idx_permissions_permission_name ON sch_20260506_093323_f9054447f7d34ec2.permissions(permission_name);",
    "CREATE INDEX idx_permissions_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.permissions(deleted_at);",
    "CREATE INDEX idx_permissions_created_at ON sch_20260506_093323_f9054447f7d34ec2.permissions(created_at);",
    "CREATE INDEX idx_permissions_updated_at ON sch_20260506_093323_f9054447f7d34ec2.permissions(updated_at);",
    "CREATE INDEX idx_notifications_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.notifications(submenu_id);",
    "CREATE INDEX idx_notifications_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.notifications(deleted_at);",
    "CREATE INDEX idx_notifications_created_at ON sch_20260506_093323_f9054447f7d34ec2.notifications(created_at);",
    "CREATE INDEX idx_notifications_updated_at ON sch_20260506_093323_f9054447f7d34ec2.notifications(updated_at);",
    "CREATE INDEX idx_audit_log_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.audit_log(submenu_id);",
    "CREATE INDEX idx_audit_log_deleted_at ON sch_20260506_093323_f9054447f7d34ec2.audit_log(deleted_at);",
    "CREATE INDEX idx_audit_log_created_at ON sch_20260506_093323_f9054447f7d34ec2.audit_log(created_at);",
    "CREATE INDEX idx_audit_log_updated_at ON sch_20260506_093323_f9054447f7d34ec2.audit_log(updated_at);",
    "CREATE INDEX idx_system_settings_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.system_settings(submenu_id);",
    "CREATE INDEX idx_system_settings_setting_name ON sch_20260506_093323_f9054447f7d34ec2.system_settings(setting_name);",
    "CREATE INDEX idx_system_settings_created_at ON sch_20260506_093323_f9054447f7d34ec2.system_settings(created_at);",
    "CREATE INDEX idx_system_settings_updated_at ON sch_20260506_093323_f9054447f7d34ec2.system_settings(updated_at);",
    "CREATE INDEX idx_advanced_shipment_notice_settings_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice_settings(submenu_id);",
    "CREATE INDEX idx_advanced_shipment_notice_settings_setting_name ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice_settings(setting_name);",
    "CREATE INDEX idx_advanced_shipment_notice_settings_created_at ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice_settings(created_at);",
    "CREATE INDEX idx_advanced_shipment_notice_settings_updated_at ON sch_20260506_093323_f9054447f7d34ec2.advanced_shipment_notice_settings(updated_at);",
    "CREATE INDEX idx_asn_line_item_settings_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item_settings(submenu_id);",
    "CREATE INDEX idx_asn_line_item_settings_setting_name ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item_settings(setting_name);",
    "CREATE INDEX idx_asn_line_item_settings_created_at ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item_settings(created_at);",
    "CREATE INDEX idx_asn_line_item_settings_updated_at ON sch_20260506_093323_f9054447f7d34ec2.asn_line_item_settings(updated_at);",
    "CREATE INDEX idx_door_master_settings_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.door_master_settings(submenu_id);",
    "CREATE INDEX idx_door_master_settings_setting_name ON sch_20260506_093323_f9054447f7d34ec2.door_master_settings(setting_name);",
    "CREATE INDEX idx_door_master_settings_created_at ON sch_20260506_093323_f9054447f7d34ec2.door_master_settings(created_at);",
    "CREATE INDEX idx_door_master_settings_updated_at ON sch_20260506_093323_f9054447f7d34ec2.door_master_settings(updated_at);",
    "CREATE INDEX idx_receiving_confirmation_report_settings_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report_settings(submenu_id);",
    "CREATE INDEX idx_receiving_confirmation_report_settings_setting_name ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report_settings(setting_name);",
    "CREATE INDEX idx_receiving_confirmation_report_settings_created_at ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report_settings(created_at);",
    "CREATE INDEX idx_receiving_confirmation_report_settings_updated_at ON sch_20260506_093323_f9054447f7d34ec2.receiving_confirmation_report_settings(updated_at);",
    "CREATE INDEX idx_supplier_settings_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.supplier_settings(submenu_id);",
    "CREATE INDEX idx_supplier_settings_setting_name ON sch_20260506_093323_f9054447f7d34ec2.supplier_settings(setting_name);",
    "CREATE INDEX idx_supplier_settings_created_at ON sch_20260506_093323_f9054447f7d34ec2.supplier_settings(created_at);",
    "CREATE INDEX idx_supplier_settings_updated_at ON sch_20260506_093323_f9054447f7d34ec2.supplier_settings(updated_at);",
    "CREATE INDEX idx_standard_asn_settings_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.standard_asn_settings(submenu_id);",
    "CREATE INDEX idx_standard_asn_settings_setting_name ON sch_20260506_093323_f9054447f7d34ec2.standard_asn_settings(setting_name);",
    "CREATE INDEX idx_standard_asn_settings_created_at ON sch_20260506_093323_f9054447f7d34ec2.standard_asn_settings(created_at);",
    "CREATE INDEX idx_standard_asn_settings_updated_at ON sch_20260506_093323_f9054447f7d34ec2.standard_asn_settings(updated_at);",
    "CREATE INDEX idx_local_asn_settings_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.local_asn_settings(submenu_id);",
    "CREATE INDEX idx_local_asn_settings_setting_name ON sch_20260506_093323_f9054447f7d34ec2.local_asn_settings(setting_name);",
    "CREATE INDEX idx_local_asn_settings_created_at ON sch_20260506_093323_f9054447f7d34ec2.local_asn_settings(created_at);",
    "CREATE INDEX idx_local_asn_settings_updated_at ON sch_20260506_093323_f9054447f7d34ec2.local_asn_settings(updated_at);",
    "CREATE INDEX idx_users_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.users_history(submenu_id);",
    "CREATE INDEX idx_users_history_users_id ON sch_20260506_093323_f9054447f7d34ec2.users_history(users_id);",
    "CREATE INDEX idx_users_history_change_type ON sch_20260506_093323_f9054447f7d34ec2.users_history(change_type);",
    "CREATE INDEX idx_users_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.users_history(created_at);",
    "CREATE INDEX idx_roles_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.roles_history(submenu_id);",
    "CREATE INDEX idx_roles_history_roles_id ON sch_20260506_093323_f9054447f7d34ec2.roles_history(roles_id);",
    "CREATE INDEX idx_roles_history_change_type ON sch_20260506_093323_f9054447f7d34ec2.roles_history(change_type);",
    "CREATE INDEX idx_roles_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.roles_history(created_at);",
    "CREATE INDEX idx_permissions_history_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.permissions_history(submenu_id);",
    "CREATE INDEX idx_permissions_history_permissions_id ON sch_20260506_093323_f9054447f7d34ec2.permissions_history(permissions_id);",
    "CREATE INDEX idx_permissions_history_change_type ON sch_20260506_093323_f9054447f7d34ec2.permissions_history(change_type);",
    "CREATE INDEX idx_permissions_history_created_at ON sch_20260506_093323_f9054447f7d34ec2.permissions_history(created_at);",
    "CREATE INDEX idx_cfg_advanced_shipment_notice_status_cfg_advanced_shipment_notice_status_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_advanced_shipment_notice_status(cfg_advanced_shipment_notice_status_id);",
    "CREATE INDEX idx_cfg_advanced_shipment_notice_status_code ON sch_20260506_093323_f9054447f7d34ec2.cfg_advanced_shipment_notice_status(code);",
    "CREATE INDEX idx_cfg_advanced_shipment_notice_status_is_active ON sch_20260506_093323_f9054447f7d34ec2.cfg_advanced_shipment_notice_status(is_active);",
    "CREATE INDEX idx_cfg_advanced_shipment_notice_status_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_advanced_shipment_notice_status(submenu_id);",
    "CREATE INDEX idx_cfg_supplier_status_cfg_supplier_status_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_supplier_status(cfg_supplier_status_id);",
    "CREATE INDEX idx_cfg_supplier_status_code ON sch_20260506_093323_f9054447f7d34ec2.cfg_supplier_status(code);",
    "CREATE INDEX idx_cfg_supplier_status_is_active ON sch_20260506_093323_f9054447f7d34ec2.cfg_supplier_status(is_active);",
    "CREATE INDEX idx_cfg_supplier_status_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_supplier_status(submenu_id);",
    "CREATE INDEX idx_cfg_users_status_cfg_users_status_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_users_status(cfg_users_status_id);",
    "CREATE INDEX idx_cfg_users_status_code ON sch_20260506_093323_f9054447f7d34ec2.cfg_users_status(code);",
    "CREATE INDEX idx_cfg_users_status_is_active ON sch_20260506_093323_f9054447f7d34ec2.cfg_users_status(is_active);",
    "CREATE INDEX idx_cfg_users_status_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_users_status(submenu_id);",
    "CREATE INDEX idx_cfg_roles_status_cfg_roles_status_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_roles_status(cfg_roles_status_id);",
    "CREATE INDEX idx_cfg_roles_status_code ON sch_20260506_093323_f9054447f7d34ec2.cfg_roles_status(code);",
    "CREATE INDEX idx_cfg_roles_status_is_active ON sch_20260506_093323_f9054447f7d34ec2.cfg_roles_status(is_active);",
    "CREATE INDEX idx_cfg_roles_status_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_roles_status(submenu_id);",
    "CREATE INDEX idx_cfg_permissions_status_cfg_permissions_status_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_permissions_status(cfg_permissions_status_id);",
    "CREATE INDEX idx_cfg_permissions_status_code ON sch_20260506_093323_f9054447f7d34ec2.cfg_permissions_status(code);",
    "CREATE INDEX idx_cfg_permissions_status_is_active ON sch_20260506_093323_f9054447f7d34ec2.cfg_permissions_status(is_active);",
    "CREATE INDEX idx_cfg_permissions_status_submenu_id ON sch_20260506_093323_f9054447f7d34ec2.cfg_permissions_status(submenu_id);"
  ],
  "_normaliser": {
    "schema_name_old": "asn_workflow",
    "schema_name_new": "sch_20260506_093323_f9054447f7d34ec2",
    "lifted_enums": 0,
    "auto_created_cfg": 0,
    "normalised_repairs": 0,
    "rewritten_columns": 6,
    "stripped_dangling_fks": 0,
    "backfilled_seeds": 0,
    "duplicate_tables_removed": 0,
    "missing_fks_injected": 0,
    "status_cfg_enforced": 0,
    "seeds_default_filled": 5,
    "saas_columns_injected": 0,
    "history_tables_created": 0,
    "indexes_emitted": 149,
    "rules": {
      "rules_total": 6,
      "appended_to_table_comment": 6,
      "added_to_assumptions": 0,
      "already_present": 0
    },
    "schema_name": "sch_20260506_093323_f9054447f7d34ec2"
  },
  "_fk_density_enforcer": {
    "cfg_tables_total": 5,
    "fks_injected": 0,
    "fks_already_present": 6,
    "candidates_skipped_no_match": 0,
    "by_business_table": {}
  },
  "_constraint_enricher": {
    "non_negative_added": 0,
    "percentage_added": 0,
    "email_added": 0,
    "date_pair_added": 0
  }
}