<?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 Version20250224115523 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('CREATE TABLE orders__payments (id INT AUTO_INCREMENT NOT NULL, order_id INT NOT NULL, created_at DATETIME NOT NULL, type VARCHAR(255) DEFAULT NULL, amount INT NOT NULL, INDEX IDX_39D29F0A8D9F6D38 (order_id), INDEX created_at (created_at), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$this->addSql('ALTER TABLE orders__payments ADD CONSTRAINT FK_39D29F0A8D9F6D38 FOREIGN KEY (order_id) REFERENCES orders__orders (id) ON DELETE CASCADE');
$this->addSql('ALTER TABLE users__users ADD deprecated_user_id INT DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('ALTER TABLE orders__payments DROP FOREIGN KEY FK_39D29F0A8D9F6D38');
$this->addSql('DROP TABLE orders__payments');
$this->addSql('ALTER TABLE users__users DROP deprecated_user_id');
}
}