Introduction to the label_formats Table
The label_formats table is designed to store and manage information about label formats for components in the Serial application. This table plays a crucial role in the system by providing a centralized repository for label specifications, including dimensions, metadata, and XML representations of label designs.Table Structure
The label_formats table is structured to capture comprehensive details about each label format. Here’s a detailed breakdown of its columns:Usage and Functionality
The label_formats table is designed to be a comprehensive storage solution for label specifications. Here are some key points about its usage:- Component-Specific Formats: Each label format is associated with a specific component, allowing for customized labeling solutions across different parts or products.
- Dimensional Flexibility: The table stores both the width and height of labels in millimeters, with an additional field for displaying sizes in either millimeters or inches, accommodating different measurement preferences.
- XML Support: The inclusion of XML fields allows for storing complex label designs that can be interpreted by label printing software or frontend rendering engines.
- Audit Trail: By tracking creation and last edit information, the table maintains a clear audit trail of changes to label formats.
- Security: Row-level security policies are implemented to ensure that users can only access and modify label formats associated with their company.
Notes
- The table has foreign key relationships with the companies, components, and users tables, ensuring data integrity and proper associations across the database.
- Row-level security is enabled on this table, which is crucial for maintaining data isolation between different companies using the system.
-
In the frontend application, this table is used in conjunction with the label_elements table to provide a complete label management system. Here’s an example of how label formats might be retrieved in the frontend:
- The XML fields (xml and xml_identifier) provide flexibility for storing and identifying complex label designs, potentially supporting integration with various label printing systems.

