Example #1
0
def create_database(destroy_existing=False):
    """ Create db and tables if it doesn't exist """
    if not os.path.exists(DB_NAME):
        logger.info('Create database: {0}'.format(DB_NAME))
        open(DB_NAME, 'a').close()
        Show.create_table()
        Episode.create_table()
        Setting.create_table()
Example #2
0
File: utils.py Project: tax/snor
def create_database(destroy_existing=False):
    """ Create db and tables if it doesn't exist """
    if not os.path.exists(DB_NAME):
        logger.info('Create database: {0}'.format(DB_NAME))
        open(DB_NAME, 'a').close()
        Show.create_table()
        Episode.create_table()
        Setting.create_table()
Example #3
0
def create_tables():
    auth.User.create_table(fail_silently=True)
    Users.create_table(fail_silently=True)
    Role.create_table(fail_silently=True)
    Category.create_table(fail_silently=True)
    Product.create_table(fail_silently=True)
    Period.create_table(fail_silently=True)
    Order_detail.create_table(fail_silently=True)
    Address.create_table(fail_silently=True)
    Show.create_table(fail_silently=True)
    UserRoles.create_table(fail_silently=True)
    Configure.create_table(fail_silently=True)
    WinRecord.create_table(fail_silently=True)