python - Flask-Migrate not creating migrations -


i have app_db module in application

import os  flask import flask flask.ext.sqlalchemy import sqlalchemy flask.ext.script import manager flask.ext.migrate import migrate, migratecommand app.models.models import *      if os.environ.get('database_url') none:         sqlalchemy_database_uri = 'postgresql://ewojitxcrklhxpq:wkao8d-hdr2hgoqxyadbjmkhgr@ec2-23-23-214-211.compute-1.amazonaws.com:5432/d7i8ucmlletq2mmv'     else:         sqlalchemy_database_uri = os.environ['database_url']       app = flask(__name__)     app.config['sqlalchemy_database_uri'] = sqlalchemy_database_uri     db = sqlalchemy(app)      migrate = migrate(app, db)     manager = manager(app)     manager.add_command('db', migratecommand)       if(__name__=='main'):        manager.run() 

all model classes in app.models.models. application connects db , returns results correctly when run python app_db.py db init no migration created ? doing wrong ?

if trying create automatic migration script, reason alembic not detecting changes changes in database, there no difference between models , database schema. try deleting tables in database db.drop_all(), try again.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -