fleet icon indicating copy to clipboard operation
fleet copied to clipboard

Create script which runs basic SQL query on all mac tables and stores results

Open zhumo opened this issue 3 years ago • 0 comments

Goal

We want a script that runs the bare minimum SELECT * FROM table query for all tables on Mac, so that we can run it for new versions of different software and then compare the outputs to run validations.

Requirements

  • run SELECT * FROM table for all tables EXCEPT
    • where tables have constraints (include WHERE clause for the constraint)
    • where tables have user-specific requirements. Then include WHERE user=#{current_uid}, where current_uid is the uid value in the output of the id -u command in terminal
    • where necessary, limit the number of rows to 3
  • Store the query and the output to a file. The intended use case of this file is to diff it against a subsequent file to compare the results
  • If no output was returned, write "no output"
  • Separate each table with ====== table name ======== so that it is easy on the eyes

Related

  • Parent Epic: https://github.com/fleetdm/fleet/issues/6852

zhumo avatar Aug 12 '22 15:08 zhumo