docs: Update database setup script to reflect current table structure
- Added printed_labels column (INT(1) DEFAULT 0) for print tracking - Added data_livrare column (DATE NULL) for delivery dates from CSV - Added dimensiune column (VARCHAR(20) NULL) for product dimensions - Updated documentation to explain new columns and their purpose This keeps the setup script synchronized with the actual database structure that has been modified during development and testing.
This commit is contained in:
@@ -108,7 +108,14 @@ def create_scan_tables():
|
||||
return False
|
||||
|
||||
def create_order_for_labels_table():
|
||||
"""Create order_for_labels table"""
|
||||
"""Create order_for_labels table
|
||||
|
||||
This table stores production orders for label generation.
|
||||
Includes columns added for print module functionality:
|
||||
- printed_labels: Track if labels have been printed (0=no, 1=yes)
|
||||
- data_livrare: Delivery date from CSV uploads
|
||||
- dimensiune: Product dimensions from CSV uploads
|
||||
"""
|
||||
print_step(3, "Creating Order for Labels Table")
|
||||
|
||||
try:
|
||||
@@ -129,7 +136,10 @@ def create_order_for_labels_table():
|
||||
open_for_order VARCHAR(25) NULL,
|
||||
line_number INT(3) NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
||||
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
printed_labels INT(1) DEFAULT 0,
|
||||
data_livrare DATE NULL,
|
||||
dimensiune VARCHAR(20) NULL
|
||||
);
|
||||
"""
|
||||
cursor.execute(order_labels_query)
|
||||
|
||||
Reference in New Issue
Block a user