code: def read(self, name):
          
          call_params = dict()
          if os.name == 'nt' and sys.version_info >= (3, 0):
              # if system is windows - force utf-8 encoding
              call_params['encoding'] = 'utf-8'
          with open(os.path.join(self.migrate_dir, name + '.py'), **call_params) as f:
              code = f.read()
              scope = {}
              exec_in(code, scope)
              return scope.get('migrate', VOID), scope.get('rollback', VOID)
docs: Read migration from file.