api/src/Migrations/Version20220414094100.php
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* From admin community create :) !
*/
final class Version20220414094100 extends AbstractMigration
{
public function up(Schema $schema): void
{
$this->addSql("INSERT INTO `auth_item` (`id`, `auth_rule_id`, `type`, `name`, `description`) VALUES (305, NULL, 1, 'from_admin_community_create', 'Create a community from admin');");
$this->addSql("INSERT INTO `auth_item_child` (`parent_id`, `child_id`) VALUES ('2', '305');");
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');
}
}