migrations/Version20260205184438.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. final class Version20260205184438 extends AbstractMigration
  7. {
  8.     public function getDescription(): string
  9.     {
  10.         return 'Create forms_inscription table if missing';
  11.     }
  12.     public function up(Schema $schema): void
  13.     {
  14.         $this->addSql("
  15.             CREATE TABLE IF NOT EXISTS forms_inscription (
  16.                 id INT AUTO_INCREMENT NOT NULL,
  17.                 catalogue_form_enabled TINYINT(1) NOT NULL DEFAULT 0,
  18.                 PRIMARY KEY(id)
  19.             ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
  20.         ");
  21.     }
  22.     public function down(Schema $schema): void
  23.     {
  24.         $this->addSql("DROP TABLE IF EXISTS forms_inscription");
  25.     }
  26. }