old_contents: from flask_script import Manager
  
  from app import app
  
  manager = Manager(app)
  
  if __name__ == "__main__":
      manager.run()
new_contents: import os
  
  from flask_script import Manager
  from flask_migrate import Migrate, MigrateCommand
  
  from api import create_app, db
  
  application = create_app(os.getenv('FLASK_CONFIG') or 'default')
  
  migrate = Migrate(application, db)
  
  manager = Manager(application)
  manager.add_command('db', MigrateCommand)
  
  
  @manager.command
  def test():
      """Run the unit tests."""
      import unittest
  
      tests = unittest.TestLoader().discover('tests')
      unittest.TextTestRunner(verbosity=2).run(tests)
  
  
  @manager.command
  def recreate_db():
      """
      Recreates a local database. Drops and creates a new database
      """
      db.drop_all()
      db.create_all()
      db.session.commit()
  
  if __name__ == "__main__":
      manager.run()
  
subject: Add flask migrate and test command to manage.py file