PHP code example of tarunkorat / laravel-migration-squasher
1. Go to this page and download the library: Download tarunkorat/laravel-migration-squasher library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
tarunkorat / laravel-migration-squasher example snippets
return [
// Date before which migrations will be squashed
'squash_before' => env('MIGRATION_SQUASH_BEFORE', '2024-01-01'),
// Number of recent migrations to keep separate
'keep_recent' => (int) env('MIGRATION_SQUASH_KEEP_RECENT', 10),
// Name of the generated schema dump file
'schema_file' => '0000_00_00_000000_schema_dump.php',
// Create backup of squashed migrations
'backup_migrations' => env('MIGRATION_SQUASH_BACKUP', true),
// Backup directory path
'backup_path' => env('MIGRATION_SQUASH_BACKUP_PATH', 'migrations/backup'),
// Tables to exclude from schema dump
'excluded_tables' => [
'migrations',
],
// Delete migration records from database
'delete_batch_records' => false,
];