api/src/Migrations/Version20231122113900.php
<?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 Version20231122113900 extends AbstractMigration
{
public function up(Schema $schema): void
{
// this up() 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\'.');
// #6787 Gratuity campaigns
$this->addSql("
INSERT INTO `auth_item` (`id`, `auth_rule_id`, `type`, `name`, `description`) VALUES
(315, NULL, 1, 'gratuity_create', 'Create a gratuity campaign'),
(316, NULL, 1, 'gratuity_read', 'Read a gratuity campaign'),
(317, NULL, 1, 'gratuity_list', 'List all gratuity campaigns')
");
$this->addSql('
INSERT INTO `auth_item_child` (`parent_id`, `child_id`) VALUES
(1, 315),
(1, 316),
(1, 317)
');
}
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\'.');
}
}