Esempio n. 1
0
def create(default_data=True, sample_data=False):
    """Creates database tables from sqlalchemy models"""
    db.create_all()
    populate(default_data, sample_data)

    # add database version table and add current head version
    alembic_cfg = Config("alembic.ini")
    command.stamp(alembic_cfg, 'head')

    print('All tables are created and data is loaded.')
Esempio n. 2
0
def create(default_data=True, sample_data=False):
    """Creates database tables from sqlalchemy models"""
    db.create_all()
    populate(default_data, sample_data)

    # add database version table and add current head version
    alembic_cfg = Config("alembic.ini")
    command.stamp(alembic_cfg, 'head')

    print ('All tables are created and data is loaded.')
Esempio n. 3
0
 def setUp(self):
     db.create_all()
     populate(default_data=True)
Esempio n. 4
0
 def setUp(self):
     db.create_all()
     populate(default_data=True)