Download the PHP package patrickquijano/laravel-migration without Composer
On this page you can find all versions of the php package patrickquijano/laravel-migration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download patrickquijano/laravel-migration
More information about patrickquijano/laravel-migration
Files in patrickquijano/laravel-migration
Package laravel-migration
Short Description This Laravel package provides extended functionalities by overriding core Laravel migration classes.
License MIT
Informations about the package laravel-migration
Laravel Migration
This Laravel package provides enhanced functionality for managing database migrations. It extends the core class and facade to streamline your migration experience.
Features
- Standardized Time Precision: Ensures all time-related database types (like and ) utilize a precision of 6 by default (instead of the default 0).
- Automatic Morph Indexing: Automatically adds indexes to all columns created using morph relationships (, , etc.) for improved performance in queries.
Installation
Usage
To leverage this package in your existing migrations, simply rename the following classes:
- Replace with
- Replace with
Example (Before):
Example (After):
Publish Stub Files (Optional)
For convenience, you can publish stub files with the updated imports for your future migrations:
This will create new stub files within your directory, reflecting the package's classes.
Benefits
- Improved Code Consistency: Enforces a standardized time precision for temporal database types.
- Enhanced Performance: Automatic indexing on morph relationships leads to faster queries.
- Streamlined Development: Stub file publishing simplifies migration creation with pre-configured imports.
We encourage you to utilize this package to streamline your Laravel migration development and ensure optimal database performance.