2025-06-28 02:35:58 +02:00
|
|
|
#!/usr/bin/env php
|
|
|
|
|
<?php
|
|
|
|
|
|
2025-06-28 11:46:29 +02:00
|
|
|
require __DIR__ . '/../bootstrap/autoload.php';
|
2025-06-28 02:35:58 +02:00
|
|
|
|
|
|
|
|
use Illuminate\Filesystem\Filesystem;
|
|
|
|
|
use Illuminate\Database\Migrations\DatabaseMigrationRepository;
|
|
|
|
|
use Illuminate\Database\Migrations\Migrator;
|
|
|
|
|
|
|
|
|
|
$repository = new DatabaseMigrationRepository($capsule->getDatabaseManager(), 'migrations');
|
|
|
|
|
$migrator = new Migrator($repository, $capsule->getDatabaseManager(), new Filesystem);
|
|
|
|
|
|
|
|
|
|
if (! $repository->repositoryExists()) {
|
|
|
|
|
$repository->createRepository();
|
2025-06-28 11:46:29 +02:00
|
|
|
logger('migration')->info("Migration table created");
|
2025-06-28 02:35:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$migrator->run(__DIR__ . '/../database/migrations');
|
2025-06-28 11:46:29 +02:00
|
|
|
logger('migration')->info("Migrations completed successfully");
|