vendor/eckinox/security-bundle/migrations/Version20230626182508.php line 1

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace EckinoxSecurityMigrations;
  4. use Doctrine\DBAL\Schema\Schema;
  5. use Doctrine\Migrations\AbstractMigration;
  6. final class Version20230626182508 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return 'Create table for refresh tokens';
  11.     }
  12.     public function up(Schema $schema): void
  13.     {
  14.         // this up() migration is auto-generated, please modify it to your needs
  15.         $this->addSql('CREATE TABLE eckinox_refresh_tokens (id INT AUTO_INCREMENT NOT NULL, refresh_token VARCHAR(128) NOT NULL, username VARCHAR(255) NOT NULL, valid DATETIME NOT NULL, UNIQUE INDEX UNIQ_660D5AB7C74F2195 (refresh_token), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
  16.     }
  17.     public function down(Schema $schema): void
  18.     {
  19.         // this down() migration is auto-generated, please modify it to your needs
  20.         $this->addSql('DROP TABLE eckinox_refresh_tokens');
  21.     }
  22. }