point-tools/migrations/Version20160324002719.php

26 lines
805 B
PHP
Raw Permalink Normal View History

2016-03-23 21:29:57 +00:00
<?php
2023-03-12 15:15:25 +00:00
declare(strict_types=1);
namespace DoctrineMigrations;
2016-03-23 21:29:57 +00:00
use Doctrine\DBAL\Schema\Schema;
2023-03-12 15:15:25 +00:00
use Doctrine\Migrations\AbstractMigration;
2016-03-23 21:29:57 +00:00
2023-03-12 15:15:25 +00:00
final class Version20160324002719 extends AbstractMigration
2016-03-23 21:29:57 +00:00
{
2023-03-12 15:15:25 +00:00
public function up(Schema $schema): void
2016-03-23 21:29:57 +00:00
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users.users ADD updated_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
}
2023-03-12 15:15:25 +00:00
public function down(Schema $schema): void
2016-03-23 21:29:57 +00:00
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users.users DROP updated_at');
}
}