Esempio n. 1
0
import peeweedbevolve
from database import db
from models import *

if __name__ == '__main__':
    db.evolve(ignore_tables={'base_model'})
Esempio n. 2
0
def migrate():
    db.evolve(interactive=True
              if os.environ["FLASK_ENV"] == "development" else False,
              ignore_tables=["base_model"])
Esempio n. 3
0
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")
Esempio n. 4
0
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