chore: initial import for test contour
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<?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 Version20260213132749 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return 'Create article table';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
$this->addSql('CREATE TABLE article (
|
||||
id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL,
|
||||
name TEXT,
|
||||
preview_picture TEXT,
|
||||
active BOOLEAN DEFAULT NULL,
|
||||
doctors JSONB DEFAULT NULL,
|
||||
services JSONB DEFAULT NULL,
|
||||
region_id INT DEFAULT NULL,
|
||||
alias TEXT,
|
||||
anons TEXT,
|
||||
content TEXT,
|
||||
update_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL,
|
||||
PRIMARY KEY (id)
|
||||
)');
|
||||
$this->addSql('CREATE INDEX idx_article_active ON article (active)');
|
||||
$this->addSql('CREATE INDEX idx_article_region_id ON article (region_id)');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
$this->addSql('DROP TABLE article');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user