|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Auto-generated Migration: Please modify to your needs! |
|
|
* Auto-generated Migration: Please modify to your needs! |
|
|
*/ |
|
|
*/ |
|
|
final class Version20210610132217 extends AbstractMigration |
|
|
|
|
|
|
|
|
final class Version20210614130910 extends AbstractMigration |
|
|
{ |
|
|
{ |
|
|
public function getDescription(): string |
|
|
public function getDescription(): string |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
$this->addSql('CREATE TABLE reminder_user_interface (reminder_id INT NOT NULL, user_interface_id INT NOT NULL, INDEX IDX_7FD2584BD987BE75 (reminder_id), INDEX IDX_7FD2584B2BC79580 (user_interface_id), PRIMARY KEY(reminder_id, user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE reminder_user_interface (reminder_id INT NOT NULL, user_interface_id INT NOT NULL, INDEX IDX_7FD2584BD987BE75 (reminder_id), INDEX IDX_7FD2584B2BC79580 (user_interface_id), PRIMARY KEY(reminder_id, user_interface_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE section (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, cycle VARCHAR(32) NOT NULL, is_default TINYINT(1) DEFAULT NULL, color VARCHAR(32) NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_2D737AEF6796D554 (merchant_id), INDEX IDX_2D737AEFB03A8386 (created_by_id), INDEX IDX_2D737AEF896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE section (id INT AUTO_INCREMENT NOT NULL, merchant_id INT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, cycle VARCHAR(32) NOT NULL, is_default TINYINT(1) DEFAULT NULL, color VARCHAR(32) NOT NULL, title VARCHAR(255) NOT NULL, description LONGTEXT DEFAULT NULL, meta_title VARCHAR(255) DEFAULT NULL, meta_description LONGTEXT DEFAULT NULL, old_urls LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', slug VARCHAR(255) NOT NULL, position DOUBLE PRECISION NOT NULL, status DOUBLE PRECISION NOT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, INDEX IDX_2D737AEF6796D554 (merchant_id), INDEX IDX_2D737AEFB03A8386 (created_by_id), INDEX IDX_2D737AEF896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE section_setting (id INT AUTO_INCREMENT NOT NULL, section_id INT NOT NULL, file_id INT DEFAULT NULL, name VARCHAR(63) NOT NULL, text LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_4D337597D823E37A (section_id), INDEX IDX_4D33759793CB796C (file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE section_setting (id INT AUTO_INCREMENT NOT NULL, section_id INT NOT NULL, file_id INT DEFAULT NULL, name VARCHAR(63) NOT NULL, text LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_4D337597D823E37A (section_id), INDEX IDX_4D33759793CB796C (file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
|
|
|
$this->addSql('CREATE TABLE site (id INT AUTO_INCREMENT NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
|
|
|
$this->addSql('CREATE TABLE site_setting (id INT AUTO_INCREMENT NOT NULL, site_id INT NOT NULL, file_id INT DEFAULT NULL, name VARCHAR(63) NOT NULL, text LONGTEXT DEFAULT NULL, date DATETIME DEFAULT NULL, INDEX IDX_64D05A53F6BD1646 (site_id), INDEX IDX_64D05A5393CB796C (file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE tax_rate (id INT AUTO_INCREMENT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, value DOUBLE PRECISION NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_C36330C1B03A8386 (created_by_id), INDEX IDX_C36330C1896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE tax_rate (id INT AUTO_INCREMENT NOT NULL, created_by_id INT NOT NULL, updated_by_id INT NOT NULL, title VARCHAR(255) NOT NULL, value DOUBLE PRECISION NOT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_C36330C1B03A8386 (created_by_id), INDEX IDX_C36330C1896DBBDE (updated_by_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE ticket (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, user_id INT DEFAULT NULL, type VARCHAR(32) NOT NULL, status VARCHAR(32) NOT NULL, subject VARCHAR(255) NOT NULL, tags LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', visitor_firstname VARCHAR(64) DEFAULT NULL, visitor_lastname VARCHAR(64) DEFAULT NULL, visitor_email VARCHAR(128) DEFAULT NULL, visitor_token VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_97A0ADA3B03A8386 (created_by_id), INDEX IDX_97A0ADA3896DBBDE (updated_by_id), INDEX IDX_97A0ADA3A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE ticket (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, user_id INT DEFAULT NULL, type VARCHAR(32) NOT NULL, status VARCHAR(32) NOT NULL, subject VARCHAR(255) NOT NULL, tags LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:array)\', visitor_firstname VARCHAR(64) DEFAULT NULL, visitor_lastname VARCHAR(64) DEFAULT NULL, visitor_email VARCHAR(128) DEFAULT NULL, visitor_token VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, INDEX IDX_97A0ADA3B03A8386 (created_by_id), INDEX IDX_97A0ADA3896DBBDE (updated_by_id), INDEX IDX_97A0ADA3A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE ticket_message (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, ticket_id INT NOT NULL, message LONGTEXT NOT NULL, answer_by_admin TINYINT(1) DEFAULT NULL, image_filename VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, status DOUBLE PRECISION NOT NULL, INDEX IDX_BA71692DB03A8386 (created_by_id), INDEX IDX_BA71692D896DBBDE (updated_by_id), INDEX IDX_BA71692D700047D2 (ticket_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
$this->addSql('CREATE TABLE ticket_message (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, ticket_id INT NOT NULL, message LONGTEXT NOT NULL, answer_by_admin TINYINT(1) DEFAULT NULL, image_filename VARCHAR(255) DEFAULT NULL, dev_alias VARCHAR(255) DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, status DOUBLE PRECISION NOT NULL, INDEX IDX_BA71692DB03A8386 (created_by_id), INDEX IDX_BA71692D896DBBDE (updated_by_id), INDEX IDX_BA71692D700047D2 (ticket_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); |
|
|
|
|
|
|
|
|
$this->addSql('ALTER TABLE section ADD CONSTRAINT FK_2D737AEF896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)'); |
|
|
$this->addSql('ALTER TABLE section ADD CONSTRAINT FK_2D737AEF896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)'); |
|
|
$this->addSql('ALTER TABLE section_setting ADD CONSTRAINT FK_4D337597D823E37A FOREIGN KEY (section_id) REFERENCES section (id)'); |
|
|
$this->addSql('ALTER TABLE section_setting ADD CONSTRAINT FK_4D337597D823E37A FOREIGN KEY (section_id) REFERENCES section (id)'); |
|
|
$this->addSql('ALTER TABLE section_setting ADD CONSTRAINT FK_4D33759793CB796C FOREIGN KEY (file_id) REFERENCES file (id)'); |
|
|
$this->addSql('ALTER TABLE section_setting ADD CONSTRAINT FK_4D33759793CB796C FOREIGN KEY (file_id) REFERENCES file (id)'); |
|
|
|
|
|
$this->addSql('ALTER TABLE site_setting ADD CONSTRAINT FK_64D05A53F6BD1646 FOREIGN KEY (site_id) REFERENCES site (id)'); |
|
|
|
|
|
$this->addSql('ALTER TABLE site_setting ADD CONSTRAINT FK_64D05A5393CB796C FOREIGN KEY (file_id) REFERENCES file (id)'); |
|
|
$this->addSql('ALTER TABLE tax_rate ADD CONSTRAINT FK_C36330C1B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)'); |
|
|
$this->addSql('ALTER TABLE tax_rate ADD CONSTRAINT FK_C36330C1B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)'); |
|
|
$this->addSql('ALTER TABLE tax_rate ADD CONSTRAINT FK_C36330C1896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)'); |
|
|
$this->addSql('ALTER TABLE tax_rate ADD CONSTRAINT FK_C36330C1896DBBDE FOREIGN KEY (updated_by_id) REFERENCES user (id)'); |
|
|
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)'); |
|
|
$this->addSql('ALTER TABLE ticket ADD CONSTRAINT FK_97A0ADA3B03A8386 FOREIGN KEY (created_by_id) REFERENCES user (id)'); |
|
|
|
|
|
|
|
|
$this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB6203DA5256D'); |
|
|
$this->addSql('ALTER TABLE page DROP FOREIGN KEY FK_140AB6203DA5256D'); |
|
|
$this->addSql('ALTER TABLE page_file DROP FOREIGN KEY FK_B5B2ACA93CB796C'); |
|
|
$this->addSql('ALTER TABLE page_file DROP FOREIGN KEY FK_B5B2ACA93CB796C'); |
|
|
$this->addSql('ALTER TABLE section_setting DROP FOREIGN KEY FK_4D33759793CB796C'); |
|
|
$this->addSql('ALTER TABLE section_setting DROP FOREIGN KEY FK_4D33759793CB796C'); |
|
|
|
|
|
$this->addSql('ALTER TABLE site_setting DROP FOREIGN KEY FK_64D05A5393CB796C'); |
|
|
$this->addSql('ALTER TABLE reduction_cart_group_user_interface DROP FOREIGN KEY FK_16258520F583BABC'); |
|
|
$this->addSql('ALTER TABLE reduction_cart_group_user_interface DROP FOREIGN KEY FK_16258520F583BABC'); |
|
|
$this->addSql('ALTER TABLE reduction_catalog_group_user_interface DROP FOREIGN KEY FK_32F80FA3F583BABC'); |
|
|
$this->addSql('ALTER TABLE reduction_catalog_group_user_interface DROP FOREIGN KEY FK_32F80FA3F583BABC'); |
|
|
$this->addSql('ALTER TABLE user_group_user_interface DROP FOREIGN KEY FK_12B87B34F583BABC'); |
|
|
$this->addSql('ALTER TABLE user_group_user_interface DROP FOREIGN KEY FK_12B87B34F583BABC'); |
|
|
|
|
|
|
|
|
$this->addSql('ALTER TABLE product_family_section_interface DROP FOREIGN KEY FK_2991468D6BA77450'); |
|
|
$this->addSql('ALTER TABLE product_family_section_interface DROP FOREIGN KEY FK_2991468D6BA77450'); |
|
|
$this->addSql('ALTER TABLE section_setting DROP FOREIGN KEY FK_4D337597D823E37A'); |
|
|
$this->addSql('ALTER TABLE section_setting DROP FOREIGN KEY FK_4D337597D823E37A'); |
|
|
$this->addSql('ALTER TABLE user_merchant DROP FOREIGN KEY FK_9426C1E1FE54D809'); |
|
|
$this->addSql('ALTER TABLE user_merchant DROP FOREIGN KEY FK_9426C1E1FE54D809'); |
|
|
|
|
|
$this->addSql('ALTER TABLE site_setting DROP FOREIGN KEY FK_64D05A53F6BD1646'); |
|
|
$this->addSql('ALTER TABLE merchant DROP FOREIGN KEY FK_74AB25E1FDD13F95'); |
|
|
$this->addSql('ALTER TABLE merchant DROP FOREIGN KEY FK_74AB25E1FDD13F95'); |
|
|
$this->addSql('ALTER TABLE order_product DROP FOREIGN KEY FK_2530ADE6FDD13F95'); |
|
|
$this->addSql('ALTER TABLE order_product DROP FOREIGN KEY FK_2530ADE6FDD13F95'); |
|
|
$this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADFDD13F95'); |
|
|
$this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADFDD13F95'); |
|
|
|
|
|
|
|
|
$this->addSql('DROP TABLE reminder_user_interface'); |
|
|
$this->addSql('DROP TABLE reminder_user_interface'); |
|
|
$this->addSql('DROP TABLE section'); |
|
|
$this->addSql('DROP TABLE section'); |
|
|
$this->addSql('DROP TABLE section_setting'); |
|
|
$this->addSql('DROP TABLE section_setting'); |
|
|
|
|
|
$this->addSql('DROP TABLE site'); |
|
|
|
|
|
$this->addSql('DROP TABLE site_setting'); |
|
|
$this->addSql('DROP TABLE tax_rate'); |
|
|
$this->addSql('DROP TABLE tax_rate'); |
|
|
$this->addSql('DROP TABLE ticket'); |
|
|
$this->addSql('DROP TABLE ticket'); |
|
|
$this->addSql('DROP TABLE ticket_message'); |
|
|
$this->addSql('DROP TABLE ticket_message'); |