<?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 Version20260716083939 extends AbstractMigration
{
    public function getDescription(): string
    {
        return '';
    }

    public function up(Schema $schema): void
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE wallet_transactions ADD created_by_name VARCHAR(120) DEFAULT NULL, ADD payment_method VARCHAR(20) DEFAULT NULL, ADD reference VARCHAR(120) DEFAULT NULL, ADD status VARCHAR(15) DEFAULT \'confirmed\' NOT NULL, ADD created_by_id INT DEFAULT NULL');
        $this->addSql('ALTER TABLE wallet_transactions ADD CONSTRAINT FK_A50205E2B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON DELETE SET NULL');
        $this->addSql('CREATE INDEX IDX_A50205E2B03A8386 ON wallet_transactions (created_by_id)');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('ALTER TABLE wallet_transactions DROP FOREIGN KEY FK_A50205E2B03A8386');
        $this->addSql('DROP INDEX IDX_A50205E2B03A8386 ON wallet_transactions');
        $this->addSql('ALTER TABLE wallet_transactions DROP created_by_name, DROP payment_method, DROP reference, DROP status, DROP created_by_id');
    }
}
