<?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 Version20230520082122 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 "order" ADD fullname VARCHAR(255) NOT NULL');
        $this->addSql('ALTER TABLE "order" ADD address_line1 VARCHAR(255) NOT NULL');
        $this->addSql('ALTER TABLE "order" ADD address_line2 VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE "order" ADD state VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE "order" ADD price VARCHAR(255) DEFAULT NULL');
        $this->addSql('ALTER TABLE "order" DROP name');
        $this->addSql('ALTER TABLE "order" DROP surname');
        $this->addSql('ALTER TABLE "order" DROP street');
        $this->addSql('ALTER TABLE "order" ALTER postcode TYPE VARCHAR(255)');
        $this->addSql('ALTER TABLE "order" ALTER email DROP NOT NULL');
        $this->addSql('ALTER TABLE "order" ALTER status DROP NOT NULL');
    }

    public function down(Schema $schema): void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->addSql('CREATE SCHEMA public');
        $this->addSql('ALTER TABLE "order" ADD name VARCHAR(255) NOT NULL');
        $this->addSql('ALTER TABLE "order" ADD surname VARCHAR(255) NOT NULL');
        $this->addSql('ALTER TABLE "order" ADD street VARCHAR(255) NOT NULL');
        $this->addSql('ALTER TABLE "order" DROP fullname');
        $this->addSql('ALTER TABLE "order" DROP address_line1');
        $this->addSql('ALTER TABLE "order" DROP address_line2');
        $this->addSql('ALTER TABLE "order" DROP state');
        $this->addSql('ALTER TABLE "order" DROP price');
        $this->addSql('ALTER TABLE "order" ALTER email SET NOT NULL');
        $this->addSql('ALTER TABLE "order" ALTER postcode TYPE INT');
        $this->addSql('ALTER TABLE "order" ALTER status SET NOT NULL');
    }
}
