def create_base_schema(): log.info('Creating base schema') create_log.info("SCHEMA") # Functions functions = environ.find_resource('sql', 'functions.sql') if db_settings.execute_sql(functions) != 0: error(u'Failed to create functions') # A Base schema shared between all RDBMS implementations schema = _get_latest_schema() if db_settings.execute_sql(schema) != 0: error(u'Failed to create base schema') try: schema = environ.find_resource('sql', '%s-schema.sql' % db_settings.rdbms) if db_settings.execute_sql(schema) != 0: error(u'Failed to create %s specific schema' % (db_settings.rdbms, )) except EnvironmentError: pass migration = StoqlibSchemaMigration() migration.apply_all_patches()
def create_base_schema(): log.info('Creating base schema') create_log.info("SCHEMA") create_database_functions() # A Base schema shared between all RDBMS implementations schema = _get_latest_schema() if db_settings.execute_sql(schema) != 0: error(u'Failed to create base schema') migration = StoqlibSchemaMigration() migration.apply_all_patches()
def create_base_schema(): log.info('Creating base schema') create_log.info("SCHEMA") create_database_functions() # A Base schema shared between all RDBMS implementations schema = _get_latest_schema() if db_settings.execute_sql(schema) != 0: error(u'Failed to create base schema') try: schema = environ.find_resource('sql', '%s-schema.sql' % db_settings.rdbms) if db_settings.execute_sql(schema) != 0: error(u'Failed to create %s specific schema' % (db_settings.rdbms, )) except EnvironmentError: pass migration = StoqlibSchemaMigration() migration.apply_all_patches()