<?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 Version20221109164911 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 cupones (id INT AUTO_INCREMENT NOT NULL, product_ids LONGTEXT DEFAULT NULL, usage_limit_per_user INT DEFAULT NULL, limit_usage_to_x_items INT DEFAULT NULL, date_expires DATETIME DEFAULT NULL, product_categories VARCHAR(1000) DEFAULT NULL, exclude_product_categories VARCHAR(1000) DEFAULT NULL, minimum_amount DOUBLE PRECISION DEFAULT NULL, maximum_amount DOUBLE PRECISION DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
$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) NOT NULL, discount_type VARCHAR(255) DEFAULT NULL, coupon_amount DOUBLE PRECISION DEFAULT NULL, individual_use VARCHAR(255) DEFAULT NULL, exclude_product_ids VARCHAR(1000) DEFAULT NULL, usage_limit INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('DROP TABLE cupones');
$this->addSql('DROP TABLE imp_cupones');
}
}