migrations/Version20210414215130.php line 1
<?php
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20210414215130 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() != 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
$this->addSql('ALTER TABLE users ADD PASSWORD_EXPIRE TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('ALTER TABLE users ADD PASSWORD_RESET_HASH VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE users ADD PASSWORD_RESET_HASH_VALIDITY TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
$this->addSql('COMMENT ON COLUMN users.PASSWORD_EXPIRE IS \'Password expire date\'');
$this->addSql('COMMENT ON COLUMN users.PASSWORD_RESET_HASH IS \'Hash needed to reset password\'');
$this->addSql('COMMENT ON COLUMN users.PASSWORD_RESET_HASH_VALIDITY IS \'Date until the password reset hash is valid\'');
$this->addSql('ALTER TABLE users ADD CREDENTIALS_SENT_LAST_ON TIMESTAMP(0)');
$this->addSql('ALTER TABLE users ADD SEND_CREDENTIALS_IMMEDIATELY BOOLEAN DEFAULT TRUE');
$this->addSql('COMMENT ON COLUMN users.CREDENTIALS_SENT_LAST_ON IS \'Last time sent user credentials\'');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
}
}