- Remove unused sqlalchemy.func import
- Replace select().delete() with delete() for proper SQLModel syntax in import_chain
- Add chain_id extraction from first block if not provided in import_data root
- Add chain_id field to Block creation during import to ensure consistency
- Remove redundant session.close() in export_chain finally block (session_scope handles cleanup)