code: def rename_table(self, model, new_name):
          
          del self.orm[model._meta.table_name]
          model._meta.table_name = new_name
          self.orm[model._meta.table_name] = model
          self.ops.append(self.migrator.rename_table(model._meta.table_name, new_name))
          return model
docs: Rename table in database.