miguelgrinberg / microblog-api

A modern (as of 2024) Flask API back end.
MIT License
365 stars 100 forks source link

Models defined with `sa.Table` not accessable in shell context #31

Closed yuxiaoy1 closed 3 months ago

yuxiaoy1 commented 3 months ago

The shell context script only filters the models defined with Model, but not sa.Table, can we modify to access them as well? https://github.com/miguelgrinberg/microblog-api/blob/main/api/app.py#L42-L50

miguelgrinberg commented 3 months ago

This project uses the ORM, so plain tables are not an important part of it and it is not really necessary that there is access to them in the shell. The tables in this project exist to support many-to-many relationships only, they are not intended to be accessed.