def create():
    """ Creates the database """
    print (ConsoleColors.INFO + '%s : Creating the database ... ' %
           current_time())
    __create__()
    if len(argv) == 3 and argv[2] == 'bootstrap':
        print (ConsoleColors.INFO +
               '%s : Bootstrapping the database ... ' % current_time())
        boot_strap()
Ejemplo n.º 2
0
def create():
    ''' Creates/bootstraps the database '''
    from libs.ConfigManager import ConfigManager  # Sets up logging
    from models import __create__, boot_strap
    print('%s : Creating the database ... ' % current_time())
    __create__()
    if len(argv) == 3 and (argv[2] == 'bootstrap' or argv[2] == '-b'):
        print('\n\n\n' +
              '%s : Bootstrapping the database ... \n' % current_time())
        boot_strap()
Ejemplo n.º 3
0
def create():
    """ Creates/bootstraps the database """
    from libs.ConfigManager import ConfigManager  # Sets up logging
    from models import __create__, boot_strap

    print ("%s : Creating the database ... " % current_time())
    __create__()
    if len(argv) == 3 and (argv[2] == "bootstrap" or argv[2] == "-b"):
        print ("\n\n\n" + "%s : Bootstrapping the database ... \n" % current_time())
        boot_strap()
Ejemplo n.º 4
0
def create():
    """
    creates the database
    --------------------
    """
    # usage: python . create
    print('=> %s : creating the database.'%curr_time())
    # checkout models/__\_\_init\_\_.py__
    from models import __create__
    __create__()
Ejemplo n.º 5
0
def create():
    """
    create      creates the database, accepts *args **kwargs
    """
    # usage: python . create *args, **kwargs
    print('=> %s : creating the database.'%current_time())
    # checkout models/__\_\_init\_\_.py__
    from libs.loader import set_loader
    set_loader(argv[2::])
    from models import __create__
    __create__()
Ejemplo n.º 6
0
def create():
    ''' Creates/bootstraps the database '''
    from libs.ConfigManager import ConfigManager  # Sets up logging
    from models import __create__, boot_strap
    print('%s : Creating the database ... ' %
          current_time())
    __create__()
    if len(argv) == 3 and (argv[2] == 'bootstrap' or argv[2] == '-b'):
        print('\n\n\n' +
            '%s : Bootstrapping the database ... \n' % current_time())
        boot_strap()
Ejemplo n.º 7
0
def create():
    """
    creates the database
    --------------------
    """
    # Create the table schemas
    # usage: python . create 
    
    #Bootstrap the database with some objects
    #usage: python . create bs
    print('=> %s : creating the database.'%curr_time())
    __create__()
    if len(argv) == 3 and argv[2] == 'bs':
        __boot_strap__()
Ejemplo n.º 8
0
def create():
    print(INFO + 'Creating the database ... ')
    __create__()
    if len(argv) == 3 and argv[2] == 'bootstrap':
        print(INFO + 'Bootstrapping the database ... ')
        boot_strap()
Ejemplo n.º 9
0
def create():
    """ Creates the database """
    print(ConsoleColors.INFO+'Creating the database ... ')
    __create__()
    print(ConsoleColors.INFO+'Completed database creation')