1. Go to this page and download the library: Download northbees/data-migrations 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/ */
declare(strict_types=1);
namespace Database\DataMigrations;
use NorthBees\DataMigrations\Contracts\DataMigrationInterface;
use NorthBees\DataMigrations\Enums\MigrationPriority;
use NorthBees\DataMigrations\Enums\MigrationType;
class FixUsersEmail implements DataMigrationInterface
{
public function up(): void
{
// Perform data migration logic here.
}
public function getPriority(): MigrationPriority
{
return MigrationPriority::HIGH;
}
public function getType(): MigrationType
{
return MigrationType::ALTER;
}
public function isTransactional(): bool
{
return true;
}
}