def prepare_export_database(tempdb): call_command("flush", "--noinput", database=get_active_content_database()) # clears the db! call_command("migrate", "content", run_syncdb=True, database=get_active_content_database(), noinput=True) logging.info("Prepared the export database.")
def prepare_export_database(tempdb): call_command("flush", "--noinput", database=get_active_content_database()) # clears the db! call_command("migrate", "content", run_syncdb=True, database=get_active_content_database(), noinput=True) logging.info("Prepared the export database.")
def save_export_database(channel_id): logging.debug("Saving export database") current_export_db_location = get_active_content_database() target_export_db_location = os.path.join(settings.DB_ROOT, "{id}.sqlite3".format(id=channel_id)) with open(current_export_db_location) as currentf: storage.save(target_export_db_location, currentf) logging.info("Successfully copied to {}".format(target_export_db_location))
def save_export_database(channel_id): logging.debug("Saving export database") current_export_db_location = get_active_content_database() target_export_db_location = os.path.join(settings.DB_ROOT, "{id}.sqlite3".format(id=channel_id)) with open(current_export_db_location) as currentf: storage.save(target_export_db_location, currentf) logging.info("Successfully copied to {}".format(target_export_db_location))