migrations/Version20240903081545.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 Version20240903081545 extends AbstractMigration
  10. {
  11.     public function getDescription(): string
  12.     {
  13.         return '';
  14.     }
  15.     public function up(Schema $schema): void
  16.     {
  17.         // this up() migration is auto-generated, please modify it to your needs
  18.         $this->addSql('CREATE SEQUENCE plan_project_id_seq');
  19.         $this->addSql('CREATE TABLE plan_project (
  20.             id INT NOT NULL DEFAULT nextval(\'plan_project_id_seq\'),
  21.             id_project INT NOT NULL,
  22.             name VARCHAR(255) NULL, 
  23.             description TEXT NULL, 
  24.             date INT NOT NULL, 
  25.             PRIMARY KEY(id)
  26.         )');
  27.     }
  28.     public function down(Schema $schema): void
  29.     {
  30.         // this down() migration is auto-generated, please modify it to your needs
  31.         $this->addSql('DROP TABLE plan_project');
  32.         $this->addSql('DROP SEQUENCE plan_project_id_seq');
  33.     }
  34. }