migrations/Version20250507052647.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace DoctrineMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. /**
  7.  * Auto-generated Migration: Please modify to your needs!
  8.  */
  9. final class Version20250507052647 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         $this->addSql('ALTER TABLE tourapp.users ADD last_login_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
  18.         $this->addSql('ALTER TABLE tourapp.users ADD password_changed_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL');
  19.         $this->addSql("INSERT INTO tourapp.log_types (id, log_type_name) VALUES
  20.             (47, 'Reset hasła - zmiana'),
  21.             (48, 'Reset hasła - token'),
  22.             (49, 'Próba logowania do systemu');
  23.         ");
  24.     }
  25.     public function down(Schema $schema): void
  26.     {
  27.         $this->addSql('ALTER TABLE tourapp.users DROP last_login_at');
  28.         $this->addSql('ALTER TABLE tourapp.users DROP password_changed_at');
  29.     }
  30. }