Search code examples
pythonmysqlflasksqlalchemy

Create only ONE table with Flask + SqlAlchemy


I'm developing a web application based on MySQL DBMS I followed the tutorial in that answer in which it creates all the tables related to every model calling the create_all().

The only one thing I don't understand is how to create only one table and not all of them. I searched through google but can't find an answer.


Solution

  • you can use create method

    Model.__table__.create(session.bind)