tpetry/laravel-postgresql-enhanced
Adds PostgreSQL-specific power to Laravel beyond the “lowest common denominator”: enhanced migrations (zero-downtime, extensions, functions, triggers, views/materialized views), advanced indexes (concurrent, partial, include, full-text, temporal), domains and table options.
partial indexes natively). Mitigated by the package’s proactive major version updates.tablefunc) directly via Laravel’s Schema facade.partial indexes).composer.json and publish the provider.partial indexes, zero-downtime).RETURNING clauses).temporal indexes require PostgreSQL 12+).Schema::table() calls will work unchanged.WITH clauses for CTEs).spatie/laravel-postgres-array). Conduct dependency analysis.config/database.php to use the enhanced PostgreSQL driver (if applicable).createExtension, full-text search).partial indexes, evaluate whether to migrate away from the package’s implementation).partial indexes, functional indexes, and zero-downtime migrations can improve query performance and reduce downtime.BEFORE UPDATE triggers on high-write tables).pg_stat_activity for long-running queries involving package features.parallel functions) can improve scalability.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Zero-downtime migration timeout | Schema left in inconsistent state. | Use rollback mechanisms; test in staging with production-like load. |
| Trigger/function syntax errors | Queries fail or produce incorrect results. | Validate in a sandbox; use BEGIN/COMMIT blocks for testing. |
| PostgreSQL version incompatibility | Features fail silently or throw errors. | Pin PostgreSQL version; test on target version before production. |
| IDE/PHPStan misconfiguration | Developers miss autocompletion or type hints. | Document setup steps; use CI checks for IDE helper generation. |
| Schema lock during migrations | Long-running migrations block writes. | Avoid peak hours; use timeout in zero-downtime migrations. |
| Extension conflicts | Duplicate or missing extensions. | Audit extensions pre-deployment; use dropExtensionIfExists. |
RETURNING, CTEs) and package-specific syntax (e.g., Blueprint methods).partial index).How can I help you explore Laravel packages today?