migrations/Version20220219134308.php line 1

Open in your IDE?
  1. <?php
    
    declare(strict_types=1);
    
    namespace DoctrineMigrations;
    
    use Doctrine\DBAL\Schema\Schema;
    use Doctrine\Migrations\AbstractMigration;
    
    /**
     * Auto-generated Migration: Please modify to your needs!
     */
    final class Version20220219134308 extends AbstractMigration
    {
        public function getDescription(): string
        {
            return '';
        }
    
        public function up(Schema $schema): void
        {
            // this up() migration is auto-generated, please modify it to your needs
            $this->addSql('CREATE TABLE file_drive_permission (id INT AUTO_INCREMENT NOT NULL, file_id INT NOT NULL, drive_permission_id VARCHAR(255) NOT NULL, role VARCHAR(255) DEFAULT NULL, email VARCHAR(255) DEFAULT NULL, google_role VARCHAR(255) DEFAULT NULL, google_type VARCHAR(255) DEFAULT NULL, INDEX IDX_240DE81693CB796C (file_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
            $this->addSql('ALTER TABLE file_drive_permission ADD CONSTRAINT FK_240DE81693CB796C FOREIGN KEY (file_id) REFERENCES file (id)');
            $this->addSql('ALTER TABLE file_group ADD share_with_authors TINYINT(1) DEFAULT NULL');
            $this->addSql('ALTER TABLE file_versions ADD share_with_authors TINYINT(1) DEFAULT NULL');
        }
    
        public function down(Schema $schema): void
        {
            // this down() migration is auto-generated, please modify it to your needs
            $this->addSql('DROP TABLE file_drive_permission');
            $this->addSql('ALTER TABLE file_group DROP share_with_authors');
            $this->addSql('ALTER TABLE file_versions DROP share_with_authors');
        }
    }