<?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 Version20221109165359 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('DROP TABLE imp_cupones');
$this->addSql('ALTER TABLE cupones ADD wp_id INT NOT NULL, ADD fecha_creacion DATETIME DEFAULT NULL, ADD codigo_cupon VARCHAR(255) NOT NULL, ADD discount_type VARCHAR(255) DEFAULT NULL, ADD coupon_amount DOUBLE PRECISION DEFAULT NULL, ADD individual_use VARCHAR(255) DEFAULT NULL, ADD exclude_product_ids VARCHAR(1000) DEFAULT NULL, ADD usage_limit INT DEFAULT NULL');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE imp_cupones (id INT AUTO_INCREMENT NOT NULL, wp_id INT NOT NULL, fecha_creacion DATETIME DEFAULT NULL, codigo_cupon VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, discount_type VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, coupon_amount DOUBLE PRECISION DEFAULT NULL, individual_use VARCHAR(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, exclude_product_ids VARCHAR(1000) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, usage_limit INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE cupones DROP wp_id, DROP fecha_creacion, DROP codigo_cupon, DROP discount_type, DROP coupon_amount, DROP individual_use, DROP exclude_product_ids, DROP usage_limit');
}
}