for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Migrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20190308200117 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->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE npd_module ADD created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL');
$this->addSql('ALTER TABLE npd_module ADD updated TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('ALTER TABLE npd_user ADD created TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL');
$this->addSql('ALTER TABLE npd_user ADD updated TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
public function down(Schema $schema): void
// this down() migration is auto-generated, please modify it to your needs
$this->addSql('CREATE SCHEMA public');
$this->addSql('ALTER TABLE npd_module DROP created');
$this->addSql('ALTER TABLE npd_module DROP updated');
$this->addSql('ALTER TABLE npd_user DROP created');
$this->addSql('ALTER TABLE npd_user DROP updated');