point-tools/migrations/Version20160324011937.php

26 lines
791 B
PHP
Raw Permalink Normal View History

2016-03-23 22:48:01 +00:00
<?php
2023-03-12 15:15:25 +00:00
declare(strict_types=1);
namespace DoctrineMigrations;
2016-03-23 22:48:01 +00:00
use Doctrine\DBAL\Schema\Schema;
2023-03-12 15:15:25 +00:00
use Doctrine\Migrations\AbstractMigration;
2016-03-23 22:48:01 +00:00
2023-03-12 15:15:25 +00:00
final class Version20160324011937 extends AbstractMigration
2016-03-23 22:48:01 +00:00
{
2023-03-12 15:15:25 +00:00
public function up(Schema $schema): void
2016-03-23 22:48:01 +00:00
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE posts.posts ALTER updated_at DROP NOT NULL');
}
2023-03-12 15:15:25 +00:00
public function down(Schema $schema): void
2016-03-23 22:48:01 +00:00
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE posts.posts ALTER updated_at SET NOT NULL');
}
}