feat: add maintenance tree_type with db migration and tests

- Expand ck_trees_tree_type CHECK constraint to include 'maintenance'
- Add 'maintenance' to TreeType Literal in schemas
- Treat maintenance trees as procedural in can_publish_tree validation
- Alembic migration 0f1ca2af3647 drops and recreates the constraint
- Two integration tests: create and filter by tree_type=maintenance

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-02-17 10:35:31 -05:00
parent 8baddd6597
commit d75e6f78e1
5 changed files with 89 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ class Tree(Base):
name='ck_trees_status'
),
CheckConstraint(
"tree_type IN ('troubleshooting', 'procedural')",
"tree_type IN ('troubleshooting', 'procedural', 'maintenance')",
name='ck_trees_tree_type'
),
)