migrations/Version20230530075011.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 Version20230530075011 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 municipio_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
  19.         // $this->addSql('CREATE TABLE municipio (id INT NOT NULL, name VARCHAR(250) DEFAULT NULL, cod VARCHAR(100) NOT NULL, PRIMARY KEY(id))');
  20.         $this->addSql('CREATE SEQUENCE conversation_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
  21.         $this->addSql('CREATE TABLE conversation (
  22.             id INT NOT NULL, 
  23.             id_project INT NOT NULL, 
  24.             id_mun INT NOT NULL, 
  25.             chat TEXT DEFAULT NULL, 
  26.             who VARCHAR(10) DEFAULT NULL, 
  27.             scenario INT NULL, 
  28.             datechat INT NOT NULL, 
  29.             iselected TEXT NULL, 
  30.             PRIMARY KEY(id)
  31.             )'
  32.         );
  33.         $this->addSql('CREATE SEQUENCE project_id_seq INCREMENT BY 1 MINVALUE 1 START 1');
  34.         $this->addSql('CREATE TABLE project (
  35.             id INT NOT NULL, 
  36.             id_user INT NOT NULL, 
  37.             id_mun INT NOT NULL, 
  38.             description TEXT DEFAULT NULL, 
  39.             name VARCHAR(100) DEFAULT NULL, 
  40.             date INT NOT NULL, 
  41.             PRIMARY KEY(id)
  42.             )'
  43.         );
  44.     }
  45.     public function down(Schema $schema): void
  46.     {
  47.         // this down() migration is auto-generated, please modify it to your needs
  48.         // $this->addSql('CREATE SCHEMA public');
  49.         // $this->addSql('DROP SEQUENCE municipio_id_seq CASCADE');
  50.         // $this->addSql('DROP TABLE municipio');
  51.         $this->addSql('DROP SEQUENCE conversation_id_seq CASCADE');
  52.         $this->addSql('DROP TABLE conversation');
  53.         $this->addSql('DROP SEQUENCE projects_id_seq CASCADE');
  54.         $this->addSql('DROP TABLE project');
  55.     }
  56. }