{
  "$schema": "mantara.schema.v1",
  "system_name": "ASN Workflow",
  "schema_name": "sch_20260507_033508_cbdcf3cf5d27440c",
  "description": "A web application for managing advanced shipment notices and related logistics operations.",
  "menus": [
    {
      "menu_id": 1,
      "menu_name": "Core Operations",
      "sequence_number": 1,
      "description": "Handles the 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": "Stores advanced shipment notices sent by suppliers announcing inbound goods. Rule all_skus_reserved: All SKUs must be reserved before ASN can move 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.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 101 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.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",
                  "comment": "FK to cfg_advanced_shipment_notice_status"
                },
                {
                  "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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": [
                {
                  "column": "supplier_id",
                  "references": "sch_20260507_033508_cbdcf3cf5d27440c.supplier(id)"
                },
                {
                  "column": "po_number",
                  "references": "sch_20260507_033508_cbdcf3cf5d27440c.order(po_number)"
                },
                {
                  "column": "status_id",
                  "references": "sch_20260507_033508_cbdcf3cf5d27440c.cfg_advanced_shipment_notice_status(cfg_advanced_shipment_notice_status_id)"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 102,
          "submenu_name": "ASN Line Item Master",
          "sequence_number": 2,
          "description": "Manage ASN line items.",
          "tables": [
            {
              "table_name": "asn_line_item",
              "comment": "Stores line items within an ASN. Rule min_one_line_item: An ASN must contain at least one line item before it can be submitted. Rule slot_assignment_required: A slot must be assigned before ASN can move to Reserved state.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 102 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "po_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "upc_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "sku",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "quantity",
                  "type": "INTEGER",
                  "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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": [
                {
                  "column": "po_number",
                  "references": "sch_20260507_033508_cbdcf3cf5d27440c.order(po_number)"
                }
              ]
            }
          ]
        },
        {
          "submenu_id": 103,
          "submenu_name": "Receiving Confirmation Report Master",
          "sequence_number": 3,
          "description": "Manage receiving confirmation reports.",
          "tables": [
            {
              "table_name": "receiving_confirmation_report",
              "comment": "Stores documents 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 103 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.cfg_receiving_confirmation_report_status(cfg_receiving_confirmation_report_status_id)",
                  "comment": "Auto-injected: archetype_default"
                },
                {
                  "name": "rcr_id",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE",
                  "comment": "was: rcrId"
                },
                {
                  "name": "sku_details",
                  "type": "JSONB",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "vendor_details",
                  "type": "JSONB",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "asn_id",
                  "type": "VARCHAR(255)",
                  "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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": [
                {
                  "column": "asn_id",
                  "references": "sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice(asn_id)"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 2,
      "menu_name": "Master Data & Catalog",
      "sequence_number": 2,
      "description": "Manage master data and catalogs.",
      "submenus": [
        {
          "submenu_id": 201,
          "submenu_name": "Supplier Master",
          "sequence_number": 1,
          "description": "Manage supplier data.",
          "tables": [
            {
              "table_name": "supplier",
              "comment": "Stores entities representing suppliers providing goods.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 201 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.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"
                },
                {
                  "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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 202,
          "submenu_name": "Order Master",
          "sequence_number": 2,
          "description": "Manage order data.",
          "tables": [
            {
              "table_name": "order",
              "comment": "Stores purchase orders used in ASN creation.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 202 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.cfg_order_status(cfg_order_status_id)",
                  "comment": "Auto-injected: archetype_default"
                },
                {
                  "name": "po_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE",
                  "comment": "was: poNumber"
                },
                {
                  "name": "vendor_id",
                  "type": "UUID",
                  "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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": [
                {
                  "column": "vendor_id",
                  "references": "sch_20260507_033508_cbdcf3cf5d27440c.supplier(id)"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "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": "Stores master data for door assignments.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 301 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.cfg_door_master_status(cfg_door_master_status_id)",
                  "comment": "Auto-injected: archetype_default"
                },
                {
                  "name": "door_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL UNIQUE",
                  "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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 302,
          "submenu_name": "ASN History",
          "sequence_number": 2,
          "description": "View history of advanced shipment notices.",
          "tables": [
            {
              "table_name": "advanced_shipment_notice_history",
              "comment": "Stores history of advanced shipment notices.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 302 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "asn_id",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL",
                  "comment": "FK to cfg_advanced_shipment_notice_status"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": [
                {
                  "column": "status_id",
                  "references": "sch_20260507_033508_cbdcf3cf5d27440c.cfg_advanced_shipment_notice_status(cfg_advanced_shipment_notice_status_id)"
                }
              ]
            }
          ]
        },
        {
          "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": "Stores history of ASN line items.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 303 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "po_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "quantity",
                  "type": "INTEGER",
                  "constraints": "NOT NULL CHECK (quantity >= 0)"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 304,
          "submenu_name": "Door History",
          "sequence_number": 4,
          "description": "View history of door assignments.",
          "tables": [
            {
              "table_name": "door_master_history",
              "comment": "Stores history of door assignments.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 304 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "door_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 305,
          "submenu_name": "RCR History",
          "sequence_number": 5,
          "description": "View history of receiving confirmation reports.",
          "tables": [
            {
              "table_name": "receiving_confirmation_report_history",
              "comment": "Stores history of receiving confirmation reports.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 305 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "rcr_id",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "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": "Stores history of suppliers.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 306 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "supplier_id",
                  "type": "UUID",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 307,
          "submenu_name": "Order History",
          "sequence_number": 7,
          "description": "View history of orders.",
          "tables": [
            {
              "table_name": "order_history",
              "comment": "Stores history of orders.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 307 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "po_number",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "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_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "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_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "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_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "status_id",
                  "type": "INT",
                  "constraints": "NOT NULL DEFAULT 1 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "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_20260507_033508_cbdcf3cf5d27440c.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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 502,
          "submenu_name": "Audit Log",
          "sequence_number": 2,
          "description": "View system audit logs.",
          "tables": [
            {
              "table_name": "audit_log",
              "comment": "Stores system audit logs.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 502 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "action",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "user_id",
                  "type": "UUID",
                  "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": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": [
                {
                  "column": "user_id",
                  "references": "sch_20260507_033508_cbdcf3cf5d27440c.users(id)"
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "menu_id": 6,
      "menu_name": "Configuration",
      "sequence_number": 6,
      "description": "Manage system configurations and settings.",
      "submenus": [
        {
          "submenu_id": 601,
          "submenu_name": "ASN Settings",
          "sequence_number": 1,
          "description": "Configure ASN settings.",
          "tables": [
            {
              "table_name": "advanced_shipment_notice_settings",
              "comment": "Stores configuration settings for ASNs.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 601 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 602,
          "submenu_name": "ASN Line Item Settings",
          "sequence_number": 2,
          "description": "Configure ASN line item settings.",
          "tables": [
            {
              "table_name": "asn_line_item_settings",
              "comment": "Stores configuration settings for ASN line items.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 602 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 603,
          "submenu_name": "Door Settings",
          "sequence_number": 3,
          "description": "Configure door settings.",
          "tables": [
            {
              "table_name": "door_master_settings",
              "comment": "Stores configuration settings for doors.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 603 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 604,
          "submenu_name": "RCR Settings",
          "sequence_number": 4,
          "description": "Configure RCR settings.",
          "tables": [
            {
              "table_name": "receiving_confirmation_report_settings",
              "comment": "Stores configuration settings for RCRs.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 604 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 605,
          "submenu_name": "Supplier Settings",
          "sequence_number": 5,
          "description": "Configure supplier settings.",
          "tables": [
            {
              "table_name": "supplier_settings",
              "comment": "Stores configuration settings for suppliers.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 605 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 606,
          "submenu_name": "Order Settings",
          "sequence_number": 6,
          "description": "Configure order settings.",
          "tables": [
            {
              "table_name": "order_settings",
              "comment": "Stores configuration settings for orders.",
              "columns": [
                {
                  "name": "id",
                  "type": "UUID",
                  "constraints": "PRIMARY KEY"
                },
                {
                  "name": "submenu_id",
                  "type": "INT",
                  "constraints": "DEFAULT 606 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "setting_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "setting_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 607,
          "submenu_name": "System Configuration",
          "sequence_number": 7,
          "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 607 NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "config_name",
                  "type": "VARCHAR(255)",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "config_value",
                  "type": "TEXT",
                  "constraints": "NOT NULL"
                },
                {
                  "name": "created_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                },
                {
                  "name": "updated_at",
                  "type": "TIMESTAMPTZ",
                  "constraints": "DEFAULT CURRENT_TIMESTAMP"
                }
              ],
              "foreign_keys": []
            }
          ]
        },
        {
          "submenu_id": 608,
          "submenu_name": "Cfg Advanced Shipment Notice Status",
          "sequence_number": 8,
          "description": "Status of the advanced shipment notice.",
          "tables": [
            {
              "table_name": "cfg_advanced_shipment_notice_status",
              "comment": "Status of the advanced shipment notice.",
              "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 608 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "unreserved",
                "reserved",
                "at door",
                "closed"
              ]
            }
          ]
        },
        {
          "submenu_id": 609,
          "submenu_name": "Receiving Confirmation Report Status",
          "sequence_number": 9,
          "description": "Configurable status values for receiving_confirmation_report",
          "tables": [
            {
              "table_name": "cfg_receiving_confirmation_report_status",
              "comment": "Status lookup for receiving_confirmation_report. Generic placeholder seeds \u2014 operator may customise via admin UI.",
              "columns": [
                {
                  "name": "cfg_receiving_confirmation_report_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_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "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_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 611,
          "submenu_name": "Order Status",
          "sequence_number": 11,
          "description": "Configurable status values for order",
          "tables": [
            {
              "table_name": "cfg_order_status",
              "comment": "Status lookup for order. Generic placeholder seeds \u2014 operator may customise via admin UI.",
              "columns": [
                {
                  "name": "cfg_order_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_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 612,
          "submenu_name": "Door Master Status",
          "sequence_number": 12,
          "description": "Configurable status values for door_master",
          "tables": [
            {
              "table_name": "cfg_door_master_status",
              "comment": "Status lookup for door_master. Generic placeholder seeds \u2014 operator may customise via admin UI.",
              "columns": [
                {
                  "name": "cfg_door_master_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_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 613,
          "submenu_name": "Users Status",
          "sequence_number": 13,
          "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 613 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 614,
          "submenu_name": "Roles Status",
          "sequence_number": 14,
          "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 614 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 615,
          "submenu_name": "Permissions Status",
          "sequence_number": 15,
          "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 615 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                }
              ],
              "foreign_keys": [],
              "_seed_values": [
                "draft",
                "open",
                "in_progress",
                "closed",
                "cancelled"
              ]
            }
          ]
        },
        {
          "submenu_id": 616,
          "submenu_name": "Users History",
          "sequence_number": 16,
          "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 616 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "users_id",
                  "type": "INT",
                  "constraints": "NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.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": 617,
          "submenu_name": "Roles History",
          "sequence_number": 17,
          "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 617 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "roles_id",
                  "type": "INT",
                  "constraints": "NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.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": 618,
          "submenu_name": "Permissions History",
          "sequence_number": 18,
          "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 618 REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.submenu(submenu_id)"
                },
                {
                  "name": "permissions_id",
                  "type": "INT",
                  "constraints": "NOT NULL REFERENCES sch_20260507_033508_cbdcf3cf5d27440c.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": [
    "UUID is used as the primary key for all tables.",
    "The system will use VARCHAR(255) for string fields unless otherwise specified.",
    "All timestamps are stored in TIMESTAMPTZ format.",
    "The system will use JSONB for storing JSON data.",
    "The system will use VARCHAR(30) for status fields referencing cfg_* tables."
  ],
  "open_questions": [
    "Clarification needed on the workflow transitions for advancedshipmentnotice_lifecycle.",
    "Clarification needed on the exact roles and permissions for each user action."
  ],
  "_indexes": [
    "CREATE INDEX idx_advanced_shipment_notice_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice(submenu_id);",
    "CREATE INDEX idx_advanced_shipment_notice_asn_id ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice(asn_id);",
    "CREATE INDEX idx_advanced_shipment_notice_supplier_id ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice(supplier_id);",
    "CREATE INDEX idx_advanced_shipment_notice_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice(status_id);",
    "CREATE INDEX idx_advanced_shipment_notice_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice(deleted_at);",
    "CREATE INDEX idx_advanced_shipment_notice_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice(created_at);",
    "CREATE INDEX idx_advanced_shipment_notice_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice(updated_at);",
    "CREATE INDEX idx_asn_line_item_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item(submenu_id);",
    "CREATE INDEX idx_asn_line_item_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item(deleted_at);",
    "CREATE INDEX idx_asn_line_item_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item(created_at);",
    "CREATE INDEX idx_asn_line_item_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item(updated_at);",
    "CREATE INDEX idx_receiving_confirmation_report_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report(submenu_id);",
    "CREATE INDEX idx_receiving_confirmation_report_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report(status_id);",
    "CREATE INDEX idx_receiving_confirmation_report_rcr_id ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report(rcr_id);",
    "CREATE INDEX idx_receiving_confirmation_report_asn_id ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report(asn_id);",
    "CREATE INDEX idx_receiving_confirmation_report_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report(deleted_at);",
    "CREATE INDEX idx_receiving_confirmation_report_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report(created_at);",
    "CREATE INDEX idx_receiving_confirmation_report_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report(updated_at);",
    "CREATE INDEX idx_supplier_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.supplier(submenu_id);",
    "CREATE INDEX idx_supplier_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.supplier(status_id);",
    "CREATE INDEX idx_supplier_supplier_id ON sch_20260507_033508_cbdcf3cf5d27440c.supplier(supplier_id);",
    "CREATE INDEX idx_supplier_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.supplier(deleted_at);",
    "CREATE INDEX idx_supplier_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.supplier(created_at);",
    "CREATE INDEX idx_supplier_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.supplier(updated_at);",
    "CREATE INDEX idx_order_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.order(submenu_id);",
    "CREATE INDEX idx_order_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.order(status_id);",
    "CREATE INDEX idx_order_po_number ON sch_20260507_033508_cbdcf3cf5d27440c.order(po_number);",
    "CREATE INDEX idx_order_vendor_id ON sch_20260507_033508_cbdcf3cf5d27440c.order(vendor_id);",
    "CREATE INDEX idx_order_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.order(deleted_at);",
    "CREATE INDEX idx_order_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.order(created_at);",
    "CREATE INDEX idx_order_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.order(updated_at);",
    "CREATE INDEX idx_door_master_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.door_master(submenu_id);",
    "CREATE INDEX idx_door_master_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.door_master(status_id);",
    "CREATE INDEX idx_door_master_door_number ON sch_20260507_033508_cbdcf3cf5d27440c.door_master(door_number);",
    "CREATE INDEX idx_door_master_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.door_master(deleted_at);",
    "CREATE INDEX idx_door_master_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.door_master(created_at);",
    "CREATE INDEX idx_door_master_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.door_master(updated_at);",
    "CREATE INDEX idx_advanced_shipment_notice_history_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice_history(submenu_id);",
    "CREATE INDEX idx_advanced_shipment_notice_history_asn_id ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice_history(asn_id);",
    "CREATE INDEX idx_advanced_shipment_notice_history_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice_history(status_id);",
    "CREATE INDEX idx_advanced_shipment_notice_history_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice_history(created_at);",
    "CREATE INDEX idx_advanced_shipment_notice_history_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice_history(updated_at);",
    "CREATE INDEX idx_asn_line_item_history_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item_history(submenu_id);",
    "CREATE INDEX idx_asn_line_item_history_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item_history(created_at);",
    "CREATE INDEX idx_asn_line_item_history_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item_history(updated_at);",
    "CREATE INDEX idx_door_master_history_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.door_master_history(submenu_id);",
    "CREATE INDEX idx_door_master_history_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.door_master_history(created_at);",
    "CREATE INDEX idx_door_master_history_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.door_master_history(updated_at);",
    "CREATE INDEX idx_receiving_confirmation_report_history_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report_history(submenu_id);",
    "CREATE INDEX idx_receiving_confirmation_report_history_rcr_id ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report_history(rcr_id);",
    "CREATE INDEX idx_receiving_confirmation_report_history_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report_history(created_at);",
    "CREATE INDEX idx_receiving_confirmation_report_history_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report_history(updated_at);",
    "CREATE INDEX idx_supplier_history_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.supplier_history(submenu_id);",
    "CREATE INDEX idx_supplier_history_supplier_id ON sch_20260507_033508_cbdcf3cf5d27440c.supplier_history(supplier_id);",
    "CREATE INDEX idx_supplier_history_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.supplier_history(created_at);",
    "CREATE INDEX idx_supplier_history_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.supplier_history(updated_at);",
    "CREATE INDEX idx_order_history_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.order_history(submenu_id);",
    "CREATE INDEX idx_order_history_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.order_history(created_at);",
    "CREATE INDEX idx_order_history_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.order_history(updated_at);",
    "CREATE INDEX idx_users_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.users(submenu_id);",
    "CREATE INDEX idx_users_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.users(status_id);",
    "CREATE INDEX idx_users_username ON sch_20260507_033508_cbdcf3cf5d27440c.users(username);",
    "CREATE INDEX idx_users_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.users(deleted_at);",
    "CREATE INDEX idx_users_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.users(created_at);",
    "CREATE INDEX idx_users_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.users(updated_at);",
    "CREATE INDEX idx_roles_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.roles(submenu_id);",
    "CREATE INDEX idx_roles_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.roles(status_id);",
    "CREATE INDEX idx_roles_role_name ON sch_20260507_033508_cbdcf3cf5d27440c.roles(role_name);",
    "CREATE INDEX idx_roles_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.roles(deleted_at);",
    "CREATE INDEX idx_roles_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.roles(created_at);",
    "CREATE INDEX idx_roles_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.roles(updated_at);",
    "CREATE INDEX idx_permissions_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.permissions(submenu_id);",
    "CREATE INDEX idx_permissions_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.permissions(status_id);",
    "CREATE INDEX idx_permissions_permission_name ON sch_20260507_033508_cbdcf3cf5d27440c.permissions(permission_name);",
    "CREATE INDEX idx_permissions_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.permissions(deleted_at);",
    "CREATE INDEX idx_permissions_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.permissions(created_at);",
    "CREATE INDEX idx_permissions_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.permissions(updated_at);",
    "CREATE INDEX idx_notifications_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.notifications(submenu_id);",
    "CREATE INDEX idx_notifications_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.notifications(deleted_at);",
    "CREATE INDEX idx_notifications_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.notifications(created_at);",
    "CREATE INDEX idx_notifications_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.notifications(updated_at);",
    "CREATE INDEX idx_audit_log_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.audit_log(submenu_id);",
    "CREATE INDEX idx_audit_log_user_id ON sch_20260507_033508_cbdcf3cf5d27440c.audit_log(user_id);",
    "CREATE INDEX idx_audit_log_deleted_at ON sch_20260507_033508_cbdcf3cf5d27440c.audit_log(deleted_at);",
    "CREATE INDEX idx_audit_log_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.audit_log(created_at);",
    "CREATE INDEX idx_audit_log_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.audit_log(updated_at);",
    "CREATE INDEX idx_advanced_shipment_notice_settings_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice_settings(submenu_id);",
    "CREATE INDEX idx_advanced_shipment_notice_settings_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice_settings(created_at);",
    "CREATE INDEX idx_advanced_shipment_notice_settings_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.advanced_shipment_notice_settings(updated_at);",
    "CREATE INDEX idx_asn_line_item_settings_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item_settings(submenu_id);",
    "CREATE INDEX idx_asn_line_item_settings_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item_settings(created_at);",
    "CREATE INDEX idx_asn_line_item_settings_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.asn_line_item_settings(updated_at);",
    "CREATE INDEX idx_door_master_settings_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.door_master_settings(submenu_id);",
    "CREATE INDEX idx_door_master_settings_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.door_master_settings(created_at);",
    "CREATE INDEX idx_door_master_settings_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.door_master_settings(updated_at);",
    "CREATE INDEX idx_receiving_confirmation_report_settings_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report_settings(submenu_id);",
    "CREATE INDEX idx_receiving_confirmation_report_settings_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report_settings(created_at);",
    "CREATE INDEX idx_receiving_confirmation_report_settings_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.receiving_confirmation_report_settings(updated_at);",
    "CREATE INDEX idx_supplier_settings_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.supplier_settings(submenu_id);",
    "CREATE INDEX idx_supplier_settings_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.supplier_settings(created_at);",
    "CREATE INDEX idx_supplier_settings_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.supplier_settings(updated_at);",
    "CREATE INDEX idx_order_settings_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.order_settings(submenu_id);",
    "CREATE INDEX idx_order_settings_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.order_settings(created_at);",
    "CREATE INDEX idx_order_settings_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.order_settings(updated_at);",
    "CREATE INDEX idx_system_settings_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.system_settings(submenu_id);",
    "CREATE INDEX idx_system_settings_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.system_settings(created_at);",
    "CREATE INDEX idx_system_settings_updated_at ON sch_20260507_033508_cbdcf3cf5d27440c.system_settings(updated_at);",
    "CREATE INDEX idx_users_history_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.users_history(submenu_id);",
    "CREATE INDEX idx_users_history_users_id ON sch_20260507_033508_cbdcf3cf5d27440c.users_history(users_id);",
    "CREATE INDEX idx_users_history_change_type ON sch_20260507_033508_cbdcf3cf5d27440c.users_history(change_type);",
    "CREATE INDEX idx_users_history_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.users_history(created_at);",
    "CREATE INDEX idx_roles_history_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.roles_history(submenu_id);",
    "CREATE INDEX idx_roles_history_roles_id ON sch_20260507_033508_cbdcf3cf5d27440c.roles_history(roles_id);",
    "CREATE INDEX idx_roles_history_change_type ON sch_20260507_033508_cbdcf3cf5d27440c.roles_history(change_type);",
    "CREATE INDEX idx_roles_history_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.roles_history(created_at);",
    "CREATE INDEX idx_permissions_history_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.permissions_history(submenu_id);",
    "CREATE INDEX idx_permissions_history_permissions_id ON sch_20260507_033508_cbdcf3cf5d27440c.permissions_history(permissions_id);",
    "CREATE INDEX idx_permissions_history_change_type ON sch_20260507_033508_cbdcf3cf5d27440c.permissions_history(change_type);",
    "CREATE INDEX idx_permissions_history_created_at ON sch_20260507_033508_cbdcf3cf5d27440c.permissions_history(created_at);",
    "CREATE INDEX idx_cfg_advanced_shipment_notice_status_cfg_advanced_shipment_notice_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_advanced_shipment_notice_status(cfg_advanced_shipment_notice_status_id);",
    "CREATE INDEX idx_cfg_advanced_shipment_notice_status_code ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_advanced_shipment_notice_status(code);",
    "CREATE INDEX idx_cfg_advanced_shipment_notice_status_is_active ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_advanced_shipment_notice_status(is_active);",
    "CREATE INDEX idx_cfg_advanced_shipment_notice_status_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_advanced_shipment_notice_status(submenu_id);",
    "CREATE INDEX idx_cfg_receiving_confirmation_report_status_cfg_receiving_confirmation_report_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_receiving_confirmation_report_status(cfg_receiving_confirmation_report_status_id);",
    "CREATE INDEX idx_cfg_receiving_confirmation_report_status_code ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_receiving_confirmation_report_status(code);",
    "CREATE INDEX idx_cfg_receiving_confirmation_report_status_is_active ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_receiving_confirmation_report_status(is_active);",
    "CREATE INDEX idx_cfg_receiving_confirmation_report_status_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_receiving_confirmation_report_status(submenu_id);",
    "CREATE INDEX idx_cfg_supplier_status_cfg_supplier_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_supplier_status(cfg_supplier_status_id);",
    "CREATE INDEX idx_cfg_supplier_status_code ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_supplier_status(code);",
    "CREATE INDEX idx_cfg_supplier_status_is_active ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_supplier_status(is_active);",
    "CREATE INDEX idx_cfg_supplier_status_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_supplier_status(submenu_id);",
    "CREATE INDEX idx_cfg_order_status_cfg_order_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_order_status(cfg_order_status_id);",
    "CREATE INDEX idx_cfg_order_status_code ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_order_status(code);",
    "CREATE INDEX idx_cfg_order_status_is_active ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_order_status(is_active);",
    "CREATE INDEX idx_cfg_order_status_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_order_status(submenu_id);",
    "CREATE INDEX idx_cfg_door_master_status_cfg_door_master_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_door_master_status(cfg_door_master_status_id);",
    "CREATE INDEX idx_cfg_door_master_status_code ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_door_master_status(code);",
    "CREATE INDEX idx_cfg_door_master_status_is_active ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_door_master_status(is_active);",
    "CREATE INDEX idx_cfg_door_master_status_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_door_master_status(submenu_id);",
    "CREATE INDEX idx_cfg_users_status_cfg_users_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_users_status(cfg_users_status_id);",
    "CREATE INDEX idx_cfg_users_status_code ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_users_status(code);",
    "CREATE INDEX idx_cfg_users_status_is_active ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_users_status(is_active);",
    "CREATE INDEX idx_cfg_users_status_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_users_status(submenu_id);",
    "CREATE INDEX idx_cfg_roles_status_cfg_roles_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_roles_status(cfg_roles_status_id);",
    "CREATE INDEX idx_cfg_roles_status_code ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_roles_status(code);",
    "CREATE INDEX idx_cfg_roles_status_is_active ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_roles_status(is_active);",
    "CREATE INDEX idx_cfg_roles_status_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_roles_status(submenu_id);",
    "CREATE INDEX idx_cfg_permissions_status_cfg_permissions_status_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_permissions_status(cfg_permissions_status_id);",
    "CREATE INDEX idx_cfg_permissions_status_code ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_permissions_status(code);",
    "CREATE INDEX idx_cfg_permissions_status_is_active ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_permissions_status(is_active);",
    "CREATE INDEX idx_cfg_permissions_status_submenu_id ON sch_20260507_033508_cbdcf3cf5d27440c.cfg_permissions_status(submenu_id);"
  ],
  "_normaliser": {
    "schema_name_old": "asn_wf",
    "schema_name_new": "sch_20260507_033508_cbdcf3cf5d27440c",
    "lifted_enums": 0,
    "auto_created_cfg": 0,
    "normalised_repairs": 0,
    "rewritten_columns": 7,
    "stripped_dangling_fks": 0,
    "backfilled_seeds": 0,
    "duplicate_tables_removed": 0,
    "missing_fks_injected": 0,
    "status_cfg_enforced": 0,
    "seeds_default_filled": 8,
    "saas_columns_injected": 0,
    "history_tables_created": 0,
    "indexes_emitted": 151,
    "rules": {
      "rules_total": 6,
      "appended_to_table_comment": 6,
      "added_to_assumptions": 0,
      "already_present": 0
    },
    "schema_name": "sch_20260507_033508_cbdcf3cf5d27440c"
  },
  "_fk_density_enforcer": {
    "cfg_tables_total": 8,
    "fks_injected": 2,
    "fks_already_present": 7,
    "candidates_skipped_no_match": 0,
    "by_business_table": {
      "advanced_shipment_notice": 1,
      "advanced_shipment_notice_history": 1
    }
  },
  "_constraint_enricher": {
    "non_negative_added": 1,
    "percentage_added": 0,
    "email_added": 0,
    "date_pair_added": 0
  }
}