migrations/Version20240214121522.php line 1

Open in your IDE?
  1. <?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 Version20240214121522 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 purchasing_groups (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, logo VARCHAR(255) NOT NULL, business_name VARCHAR(255) NOT NULL, brand_name VARCHAR(255) NOT NULL, category_id INT NOT NULL, price_level ENUM("low_mid","mid_high","high") NOT NULL, phone VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, website VARCHAR(255) NOT NULL, physical_address LONGTEXT DEFAULT NULL, member_since INT NOT NULL, description LONGTEXT DEFAULT NULL, status ENUM("active","inactive","cancelled") DEFAULT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME NULL COMMENT \'(DC2Type:datetime_immutable)\', deleted_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
            $this->addSql('CREATE TABLE purchasing_groups_categories (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, is_active SMALLINT NOT NULL, created_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', updated_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', deleted_at DATETIME DEFAULT NULL COMMENT \'(DC2Type:datetime_immutable)\', 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 purchasing_groups');
            $this->addSql('DROP TABLE purchasing_groups_categories');
        }
    }