| Total Complexity | 2 | 
| Total Lines | 23 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | #!/usr/bin/env python  | 
            ||
| 2 | # -*- coding: utf-8 -*-  | 
            ||
| 3 | from napps.kytos.mef_eline.controllers import ELineController  | 
            ||
| 4 | |||
| 5 | |||
| 6 | def rename_evc_priority_to_sb_priority() -> int:  | 
            ||
| 7 | """Rename evcs priority to sb_priority."""  | 
            ||
| 8 | controller = ELineController()  | 
            ||
| 9 | db = controller.db  | 
            ||
| 10 | return db.evcs.update_many(  | 
            ||
| 11 |         {}, {"$rename": {"priority": "sb_priority"}} | 
            ||
| 12 | ).modified_count  | 
            ||
| 13 | |||
| 14 | |||
| 15 | def main() -> None:  | 
            ||
| 16 | """Main function."""  | 
            ||
| 17 | count = rename_evc_priority_to_sb_priority()  | 
            ||
| 18 |     print(f"Rename evc priority as sb_priority updated: {count}") | 
            ||
| 19 | |||
| 20 | |||
| 21 | if __name__ == "__main__":  | 
            ||
| 22 | main()  | 
            ||
| 23 |