hemp-db

Auditing Database Entries

Overview

The auditing functionality as of Spring 2025 is done through the terminal. The relevant files are under helloworld/management/:

Script: admin.py List of past audit logs: auditlogs/

Running the script admin.py will generate a .csv file with the name: data_audit_YYYY_MM_DD with the current day in YYYY_MM_DD format. The .csv file will have three different columns:

  1. id
    • The integer id of the company in the database
  2. company_name
    • The name of the company in the database
  3. reasons
    • A comma-separated list of reasons why the company was flagged as an erroneously-formatted item. The following reasons would be considered:
      • Entry is outdated, has not been updated in 6 months or more
      • Entry is missing ‘Name’ field (sql_alias: Name)
      • Entry is missing ‘Status’ field (sql_alias: Status)
      • Entry is missing ‘Industry’ field (sql_alias: Industry)
      • Entry is missing ‘Stakeholder Category’ field (sql_alias: Category)
      • Entry is missing ‘Stakeholder Group’ field (sql_alias: stakeholderGroup)
      • Entry is missing ‘Development Stage’ field (sql_alias: Stage)
      • Entry is missing ‘Product Group’ field (sql_alias: productGroup)
      • Entry is missing ‘Description’ field (sql_alias: Description)
      • Entry is missing ‘Solution’ field (sql_alias: Solutions)

Running the Script

To execute the command in the terminal:

Limitations