<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20211214044429 extends AbstractMigration
{
public function getDescription(): string
{
return 'Add admin';
}
public function up(Schema $schema): void
{
// this up() migration is auto-generated, please modify it to your needs
$salt = md5((string)mt_rand(0, time()));
$this->addSql('INSERT INTO "user" ("login", "password", "salt", "roles", "sort", "created_at", "active") VALUES(\'admin\', \'gravity\', \'' . $salt . '\', \'["ADMIN"]\', 0, NOW(), true)');
}
public function down(Schema $schema): void
{
}
}