Skip to content

feat: add not-odoo command#3

Merged
nilshamerlinck merged 3 commits into
mainfrom
feat/not-odoo
May 15, 2026
Merged

feat: add not-odoo command#3
nilshamerlinck merged 3 commits into
mainfrom
feat/not-odoo

Conversation

@xaviedoanhduy
Copy link
Copy Markdown
Member

Summary

  • New odoo-db not-odoo <db> command detects non-Odoo database objects
  • Views: views present in pg_views but not tracked in ir_model
  • Triggers: all triggers (Odoo never creates triggers natively)
  • Functions: custom functions, excluding extension-provided ones (crosstab, dblink, etc.) via pg_depend
  • Stored Procedures: PostgreSQL 11+ procedures (prokind = 'p')
  • Supports text, json, and prometheus output formats

Motivation

During migrations (e.g. tuico), databases accumulate custom SQL objects outside Odoo's ORM. This command surfaces them so they can be reviewed before migration.

Test plan

  • odoo-db not-odoo <db> on a clean Odoo DB → only shows queue_job_notify if queue_job installed
  • Create custom view/trigger/function/procedure manually → all appear in output
  • odoo-db --output-format json not-odoo <db> → valid JSON with views, triggers, functions, procedures keys
  • odoo-db --output-format prometheus not-odoo <db> → 4 metrics emitted

@nilshamerlinck
Copy link
Copy Markdown
Contributor

…, and procedures

Shows non-Odoo database objects not managed by Odoo:
- Views not tracked in ir_model
- Triggers (Odoo never creates triggers natively)
- Custom functions (extension-provided functions like crosstab/dblink excluded)
- Stored procedures (PostgreSQL 11+ prokind='p')

Supports text, json, and prometheus output formats.
Add PyPI publish job to release workflow per template flag.
Addresses PR #3 review comment from @nilshamerlinck.
@xaviedoanhduy xaviedoanhduy changed the base branch from feat/stats to main May 15, 2026 03:22
@nilshamerlinck nilshamerlinck merged commit c04bcb6 into main May 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants