clcbws/laravel-database-lifecycle-suite
Composer 安装命令:
composer require clcbws/laravel-database-lifecycle-suite
包简介
A complete database lifecycle suite for Laravel including index standardization, data drift detection, and reverse-engineering.
README 文档
README
Laravel Database Lifecycle Suite is a premium toolkit designed for database reverse-engineering, optimization, and visualization. It provides a comprehensive 360-degree view of your database health, from structural integrity to performance bottlenecks. Fully optimized for Laravel 13.x, with legacy support for 12.x and 11.x.
📸 Showcase
Database Lifecycle Scorecard
Get a comprehensive health check of your database in one command.

Connection Latency Monitoring
Verify reachability and measure performance across all your database nodes.

Index Standardizer
Keep your index naming consistent across your entire application.

✨ Key Features
- 🌉 Legacy Bridge: Reverse-engineer an entire database into a clean Laravel project (Migrations, Models, Factories, Seeders).
- 📊 Lifecycle Scorecard: A quantifiable database health check covering performance, integrity, and connectivity.
- 📐 Index Standardizer: Automatically rename indexes to follow Laravel conventions.
- 🛡️ Index Health Audit: Detects unindexed Foreign Keys and Potential Foreign Keys (missing indexes on
_idcolumns). - 🔍 Redundant Index Detector: Identifies overlapping indexes that slow down write operations.
- 🔄 Data Drift Deep Dive: Compare data row-by-row across connections with interactive sync.
- 📸 Schema Snapshotting: Save schema states to JSON for offline comparison or time-travel restoration.
- 🎨 ERD Visualizer: Generate Mermaid.js Entity Relationship Diagrams directly from your schema.
- 🔒 PII Scanner: Identify potential security risks by scanning for sensitive data patterns.
- 📈 Size & Growth Report: Monitor disk usage and row counts across all tables.
- 🔬 Query Explainer: Get human-readable performance insights for any SQL query.
- 🧪 Cast & Type Audit: Detect discrepancies between Eloquent Model
$castsand physical DB types.
📦 Installation
You can install the package via composer:
composer require clcbws/laravel-database-lifecycle-suite
Tip
To enable Structural Drift Detection in the db:lifecycle-status report, we highly recommend also installing:
composer require clcbws/laravel-schema-sentinel
Publish the configuration file:
php artisan vendor:publish --provider="Clcbws\DatabaseLifecycleSuite\DatabaseLifecycleSuiteServiceProvider" --tag="config"
🚀 Usage
1. Database Health & Auditing
Lifecycle Scorecard
To get a full overview of your database health:
php artisan db:lifecycle-status
Missing Index Audit
To identify unindexed Foreign Keys and potential performance bottlenecks:
php artisan db:index-audit
PII Scanning
To identify sensitive data columns (Email, Phone, etc.):
php artisan db:pii-scan
2. Optimization & Standardization
Standardize Index Names
To fix non-standard index names (includes --dry-run support):
php artisan db:standardize-indexes
Find Redundant Indexes
To find overlapping indexes that should be removed:
php artisan db:index-redundancy
3. Reverse Engineering & Visualization
Legacy Bridge
To reverse-engineer your database into a new Laravel project:
php artisan db:legacy-bridge
Generate ERD
To generate a Mermaid.js diagram of your database:
php artisan db:erd --output=schema.mmd
4. Snapshots & Data Integrity
Schema Snapshot
To save the current schema state:
php artisan db:snapshot baseline
Data Drift Check
To compare data records against a source connection:
php artisan db:data-drift --source=production --table=users
🏗️ Architecture
The suite is built with a modular "Auditor-Engine" architecture:
- Auditors: Dedicated classes that analyze specific database traits (PII, Indexes, Casts).
- Engines: Reusable core components for Snapshotting, Drift Detection, and Code Generation.
- Traits: Standardized shared logic like
FiltersTablesfor multi-database isolation.
⚙️ Versioning System
We follow Semantic Versioning (SemVer):
- MAJOR (
1.x.x): Breaking changes or significant architectural shifts. - MINOR (
x.1.x): New features added in a backwards-compatible manner. - PATCH (
x.x.1): Backwards-compatible bug fixes and small improvements.
📄 License
The MIT License (MIT). Please see License File for more information.
🤝 Credits
- Author: Ahtesham
- Company: Broadway Web Service
clcbws/laravel-database-lifecycle-suite 适用场景与选型建议
clcbws/laravel-database-lifecycle-suite 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 3, 最近一次更新时间为 2026 年 05 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 clcbws/laravel-database-lifecycle-suite 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 clcbws/laravel-database-lifecycle-suite 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 53
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-06