Closed dmitriypaulov closed 3 years ago
Flask-Migrate does not generate migrations, Alembic does. This is just a thin wrapper around Alembic to make it easier to use in Flask applications. Your question applies to Alembic, so this isn't the right place for it. I would think that as long as the models are properly registered with SQLAlchemy then Alembic should see them, so I suggest you make sure SQLAlchemy is okay with your dynamic models.
Hello. Yesterday I started to develop own telegram bots mini-framework. So, the process was successful until I wanted to be able to create models dynamically via type() built-in. All created models do not exist globally, but are written to the list - object attribute. How can I explicitly tell Flask-Migrate that these models exist?
framework's main scipt:
class, which creates models:
In outer script I imported botify object from main script and call run() method. Flask-Migrate only creates migrations folder without any version.