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.
37 lines
1.5 KiB
37 lines
1.5 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 Version20251107102457 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('CREATE TABLE highlight (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, event_id VARCHAR(255) NOT NULL, article_coordinate TEXT NOT NULL, content TEXT NOT NULL, pubkey VARCHAR(255) NOT NULL, created_at INT NOT NULL, context TEXT DEFAULT NULL, cached_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, raw_event JSON DEFAULT NULL, PRIMARY KEY (id))'); |
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_C998D83471F7E88B ON highlight (event_id)'); |
|
$this->addSql('CREATE INDEX idx_article_coordinate ON highlight (article_coordinate)'); |
|
$this->addSql('CREATE INDEX idx_event_id ON highlight (event_id)'); |
|
$this->addSql('CREATE INDEX idx_created_at ON highlight (created_at)'); |
|
$this->addSql('COMMENT ON COLUMN nzine.last_fetched_at IS \'\''); |
|
} |
|
|
|
public function down(Schema $schema): void |
|
{ |
|
// this down() migration is auto-generated, please modify it to your needs |
|
$this->addSql('DROP TABLE highlight'); |
|
$this->addSql('COMMENT ON COLUMN nzine.last_fetched_at IS \'(DC2Type:datetime_immutable)\''); |
|
} |
|
}
|
|
|