point-tools/migrations/Version20170116224555.php

29 lines
826 B
PHP
Raw Permalink Normal View History

2017-01-17 21:58:53 +00:00
<?php
2023-03-12 15:15:25 +00:00
declare(strict_types=1);
namespace DoctrineMigrations;
2017-01-17 21:58:53 +00:00
use Doctrine\DBAL\Schema\Schema;
2023-03-12 15:15:25 +00:00
use Doctrine\Migrations\AbstractMigration;
2017-01-17 21:58:53 +00:00
/**
* User removal support
*/
2023-03-12 15:15:25 +00:00
final class Version20170116224555 extends AbstractMigration
2017-01-17 21:58:53 +00:00
{
2023-03-12 15:15:25 +00:00
public function up(Schema $schema): void
2017-01-17 21:58:53 +00:00
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users.users ADD is_removed BOOLEAN DEFAULT FALSE NOT NULL');
}
2023-03-12 15:15:25 +00:00
public function down(Schema $schema): void
2017-01-17 21:58:53 +00:00
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users.users DROP is_removed');
}
}