Browse Source

Migration, 5

imwald
Nuša Pukšič 3 months ago
parent
commit
2eab22324f
  1. 5
      migrations/Version20250927120000.php

5
migrations/Version20250927120000.php

@ -30,10 +30,6 @@ final class Version20250927120000 extends AbstractMigration @@ -30,10 +30,6 @@ final class Version20250927120000 extends AbstractMigration
// Add index on event.pubkey for author-based queries
$this->addSql('CREATE INDEX IF NOT EXISTS IDX_EVENT_PUBKEY ON event (pubkey)');
// Add GIN index on tags JSON column for efficient JSON queries
// Note: json_ops is the operator class for JSON columns
$this->addSql('CREATE INDEX IF NOT EXISTS IDX_EVENT_TAGS_GIN ON event USING GIN (tags json_ops)');
}
public function down(Schema $schema): void
@ -42,6 +38,5 @@ final class Version20250927120000 extends AbstractMigration @@ -42,6 +38,5 @@ final class Version20250927120000 extends AbstractMigration
$this->addSql('DROP INDEX IF EXISTS IDX_EVENT_KIND_CREATED');
$this->addSql('DROP INDEX IF EXISTS IDX_ARTICLE_SLUG');
$this->addSql('DROP INDEX IF EXISTS IDX_EVENT_PUBKEY');
$this->addSql('DROP INDEX IF EXISTS IDX_EVENT_TAGS_GIN');
}
}

Loading…
Cancel
Save