scripts
PhaseZero aftermarket application schema packaged as a PostgreSQL extension.
phasezero_scripts · PhaseZero aftermarket application schema packaged as a PostgreSQL extension.
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 100655 | scripts | phasezero_scripts | 1.4 | FEAT | Unknown | SQL |
Usage
Sources:
- Official repository README at the catalog revision
- Build recipe at the catalog revision
- Table DDL at the catalog revision
- Index DDL at the catalog revision
- Constraint DDL at the catalog revision
scripts 1.4 is not a general-purpose function library. It packages PhaseZero application DDL that creates the pzv_aftermarket schema, a fixed set of business/staging tables, indexes, and foreign keys. Install it only for that legacy application after reviewing the complete generated SQL.
Core Workflow
The Makefile generates the extension script by concatenating the table, index, and constraint files. Inspect that generated artifact before installation and use a disposable database first.
Installed Objects
- Core tables include company, category, attribute, part, scope_part, display_metadata, orders, and order_parts.
- Staging/support tables include stage_category, stage_attribute, stage_part, and temp_part_child.
- The script adds application-specific indexes and foreign keys between several of those relations. It exposes no user-facing SQL functions.
Critical Caveats
- Object names, columns, and constraints are hard-coded. Installation can collide with an existing pzv_aftermarket schema or partially matching objects, and the DDL is not written as a repeatable schema migration.
- The repository’s standalone database-creation file is not included by the extension build recipe; CREATE EXTENSION does not create a database.
- The control-file comment describes an unrelated key/value data type, while the actual generated SQL is application schema DDL. Trust the reviewed SQL, not that metadata comment.
- Upstream is abandoned and targets an old PGXS path. Take a backup, test install/uninstall behavior, and prefer a maintained migration system for new deployments.