Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add MigrateCommand while using flask built in cli?

Earlier while using Manager from flask_script we can add command to Manager like this.

from flask_migrate import Migrate, MigrateCommand
from flask_script import Manager

manager = Manager(app)
manager.add_command('db', MigrateCommand)

Now in this new flask app I am not using flask script, so how do I add command db to like flask run is?

like image 275
Ciasto piekarz Avatar asked Sep 01 '25 02:09

Ciasto piekarz


1 Answers

The flask db command is registered automatically when the extension is installed, there is nothing that you need to do on the application side.

like image 143
Miguel Avatar answered Sep 02 '25 14:09

Miguel