def rename_table(self, model, new_name):
        """Rename table in database."""
        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
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
Rename table in database.