mix ash_age.verify (AshAge v1.0.0)

Copy Markdown View Source

Verifies that Apache AGE is properly configured in your database.

$ mix ash_age.verify

Connects to the database and checks:

  1. The AGE extension is installed
  2. The search_path includes ag_catalog
  3. (Optional) A specific graph exists
  4. (Optional) A resource's label table has a matching tenant RLS policy (drift check)

Options

  • -r, --repo — The repo to verify against
  • -g, --graph — A graph name to check for existence
  • --resource — A resource module (e.g. MyApp.Doc) whose rls_guc RLS policy is checked against the DB: row level security must be enabled on the label table and a policy predicate must reference both the tenant property and the GUC. A mismatch is drift between the DSL and the DB.

Examples

$ mix ash_age.verify
$ mix ash_age.verify --graph my_graph
$ mix ash_age.verify -r MyApp.Repo -g my_graph
$ mix ash_age.verify --resource MyApp.Doc