diff --git a/migrations/Version20251006135000.php b/migrations/Version20251006135000.php new file mode 100644 index 0000000..ee2f015 --- /dev/null +++ b/migrations/Version20251006135000.php @@ -0,0 +1,59 @@ +addSql(<<<'SQL' + DROP INDEX idx_article_slug + SQL); + $this->addSql(<<<'SQL' + DROP INDEX idx_3bae0aa7afece2eb + SQL); + $this->addSql(<<<'SQL' + DROP INDEX idx_event_kind_created + SQL); + $this->addSql(<<<'SQL' + DROP INDEX 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); + } +}