import peeweedbevolve from database import db from models import * if __name__ == '__main__': db.evolve(ignore_tables={'base_model'})
def migrate(): db.evolve(interactive=True if os.environ["FLASK_ENV"] == "development" else False, ignore_tables=["base_model"])
import os os.environ['MIGRATION'] = '1' if not os.getenv('FLASK_ENV') == 'production': print("Loading environment variables from .env") from dotenv import load_dotenv load_dotenv() import peeweedbevolve from database import db from models import * print("Running Migration") if os.getenv('FLASK_ENV') == 'production': db.evolve(ignore_tables={'base_model'}, interactive=False) else: db.evolve(ignore_tables={'base_model'}) print("Finish Migration")
import peeweedbevolve import database from database import db from database import Member from database import Message db.evolve() # migrator = PostgresqlMigrator(db) # Add thanks related fields to members