src/Migrations/Version20230817085229.php line 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 Version20230817085229 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 content_faq DROP FOREIGN KEY FK_5D142339896DBBDE');
$this->addSql('ALTER TABLE content_faq DROP FOREIGN KEY FK_5D142339B03A8386');
$this->addSql('DROP TABLE content_faq');
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE TABLE content_faq (id INT AUTO_INCREMENT NOT NULL, created_by_id INT DEFAULT NULL, updated_by_id INT DEFAULT NULL, question LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, answer LONGTEXT CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, deleted TINYINT(1) DEFAULT 0 NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, active TINYINT(1) DEFAULT 1 NOT NULL, weight INT DEFAULT 10 NOT NULL, owner_uuid VARCHAR(36) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, owner_active TINYINT(1) DEFAULT 1 NOT NULL, owner_deleted TINYINT(1) DEFAULT 0 NOT NULL, INDEX IDX_5D142339896DBBDE (updated_by_id), INDEX IDX_5D142339B03A8386 (created_by_id), INDEX idx_owner (owner_uuid, deleted, active), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
$this->addSql('ALTER TABLE content_faq ADD CONSTRAINT FK_5D142339896DBBDE FOREIGN KEY (updated_by_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE SET NULL');
$this->addSql('ALTER TABLE content_faq ADD CONSTRAINT FK_5D142339B03A8386 FOREIGN KEY (created_by_id) REFERENCES users (id) ON UPDATE NO ACTION ON DELETE SET NULL');
}
}