import db def migrate(): try: db.execute_commit("ALTER TABLE order_messages ADD COLUMN deleted tinyint(1) DEFAULT 0") print("Migration: Added 'deleted' column to order_messages table.") except Exception as e: error_msg = str(e) if "Duplicate column name" in error_msg: print("Migration: 'deleted' column already exists.") else: print(f"Migration error: {error_msg}") if __name__ == "__main__": migrate()