You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.6 KiB
59 lines
1.6 KiB
<?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 Version20251006135000 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(<<<'SQL' |
|
DROP INDEX IF EXISTS idx_article_slug |
|
SQL); |
|
$this->addSql(<<<'SQL' |
|
DROP INDEX IF EXISTS idx_3bae0aa7afece2eb |
|
SQL); |
|
$this->addSql(<<<'SQL' |
|
DROP INDEX IF EXISTS idx_event_kind_created |
|
SQL); |
|
$this->addSql(<<<'SQL' |
|
DROP INDEX IF EXISTS idx_event_pubkey |
|
SQL); |
|
$this->addSql(<<<'SQL' |
|
ALTER TABLE visit ADD session_id VARCHAR(255) DEFAULT NULL |
|
SQL); |
|
} |
|
|
|
public function down(Schema $schema): void |
|
{ |
|
// this down() migration is auto-generated, please modify it to your needs |
|
$this->addSql(<<<'SQL' |
|
CREATE INDEX idx_article_slug ON article (slug) |
|
SQL); |
|
$this->addSql(<<<'SQL' |
|
ALTER TABLE visit DROP session_id |
|
SQL); |
|
$this->addSql(<<<'SQL' |
|
CREATE INDEX idx_3bae0aa7afece2eb ON event (kind) |
|
SQL); |
|
$this->addSql(<<<'SQL' |
|
CREATE INDEX idx_event_kind_created ON event (kind, created_at) |
|
SQL); |
|
$this->addSql(<<<'SQL' |
|
CREATE INDEX idx_event_pubkey ON event (pubkey) |
|
SQL); |
|
} |
|
}
|
|
|