Covivo/mobicoop

View on GitHub
api/src/Migrations/Version20230417113000.php

Summary

Maintainability
A
30 mins
Test Coverage
<?php

declare(strict_types=1);

namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
 * Login delegate.
 */
final class Version20230417113000 extends AbstractMigration
{
    public function up(Schema $schema): void
    {
        $this->addSql("INSERT INTO `auth_item` (`id`, `auth_rule_id`, `type`, `name`, `description`) VALUES (308, NULL, 1, 'hitchhiking_administrator', 'Rezo Pouce admin');");
        $this->addSql("INSERT INTO `auth_item` (`id`, `auth_rule_id`, `type`, `name`, `description`) VALUES (309, NULL, 1, 'hitchhiking_watcher', 'Rezo Pouce watcher');");
        $this->addSql('INSERT INTO `auth_item_child` (`parent_id`, `child_id`) VALUES (308, 309);');
    }

    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\'.');
    }
}