?? GreyFile — Mystic File Browser

Current path: home/webdevt/cryptoimpot.fr/data/Migrations/



?? Go up: /home/webdevt/cryptoimpot.fr/data

?? Viewing: Version20190712043815.php

<?php declare(strict_types=1);

namespace Migrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;

/**
 * Auto-generated Migration: Please modify to your needs!
 */
final class Version20190712043815 extends AbstractMigration
{
    public function up(Schema $schema) : void
    {
        // this up() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('DROP TABLE user_role_linker');
        $this->addSql('ALTER TABLE user_exchange_linker CHANGE user_id user_id VARCHAR(255) NOT NULL, ADD PRIMARY KEY (user_id)');
        $this->addSql('ALTER TABLE user_exchange_linker ADD CONSTRAINT FK_9E9C2DCA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
        $this->addSql('DROP INDEX email_idx ON user');
        $this->addSql('ALTER TABLE user CHANGE id id VARCHAR(255) NOT NULL, CHANGE email email VARCHAR(255) NOT NULL, CHANGE full_name full_name VARCHAR(255) NOT NULL, CHANGE password password VARCHAR(255) NOT NULL, CHANGE status status VARCHAR(255) NOT NULL, CHANGE date_created date_created VARCHAR(255) NOT NULL, CHANGE pwd_reset_token pwd_reset_token VARCHAR(255) NOT NULL, CHANGE pwd_reset_token_creation_date pwd_reset_token_creation_date VARCHAR(255) NOT NULL');
    }

    public function down(Schema $schema) : void
    {
        // this down() migration is auto-generated, please modify it to your needs
        $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');

        $this->addSql('CREATE TABLE user_role_linker (user_id INT NOT NULL, role_id INT NOT NULL) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB COMMENT = \'\' ');
        $this->addSql('ALTER TABLE user CHANGE id id INT AUTO_INCREMENT NOT NULL, CHANGE email email VARCHAR(128) NOT NULL COLLATE utf8_unicode_ci, CHANGE full_name full_name VARCHAR(512) DEFAULT NULL COLLATE utf8_unicode_ci, CHANGE password password VARCHAR(256) NOT NULL COLLATE utf8_unicode_ci, CHANGE status status INT NOT NULL, CHANGE date_created date_created DATETIME NOT NULL, CHANGE pwd_reset_token pwd_reset_token VARCHAR(256) DEFAULT NULL COLLATE utf8_unicode_ci, CHANGE pwd_reset_token_creation_date pwd_reset_token_creation_date DATETIME DEFAULT NULL');
        $this->addSql('CREATE UNIQUE INDEX email_idx ON user (email)');
        $this->addSql('ALTER TABLE user_exchange_linker DROP FOREIGN KEY FK_9E9C2DCA76ED395');
        $this->addSql('ALTER TABLE user_exchange_linker DROP PRIMARY KEY');
        $this->addSql('ALTER TABLE user_exchange_linker CHANGE user_id user_id INT NOT NULL');
    }
}


??

??