From a84c881e71da573953eb73c71d3768592a5aa1f8 Mon Sep 17 00:00:00 2001 From: Quality System Admin Date: Sat, 11 Oct 2025 23:38:50 +0300 Subject: [PATCH] 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. --- .../db_create_scripts/setup_complete_database.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/py_app/app/db_create_scripts/setup_complete_database.py b/py_app/app/db_create_scripts/setup_complete_database.py index f1d81e2..fa48c12 100755 --- a/py_app/app/db_create_scripts/setup_complete_database.py +++ b/py_app/app/db_create_scripts/setup_complete_database.py @@ -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)