Skip to content

Commit

Permalink
MySQL 5.6 supported
Browse files Browse the repository at this point in the history
  • Loading branch information
shahariaazam committed Jun 7, 2020
1 parent 114b679 commit 919decf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Migrations/Version20200607200825.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
*/
final class Version20200607200825 extends AbstractMigration
{
public function getDescription() : string
public function getDescription(): string
{
return '';
}

public function up(Schema $schema) : void
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->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('CREATE TABLE user (id INT AUTO_INCREMENT NOT NULL, email VARCHAR(180) NOT NULL, roles LONGTEXT NOT NULL COMMENT \'(DC2Type:json)\', password VARCHAR(255) DEFAULT NULL, first_name VARCHAR(80) NOT NULL, last_name VARCHAR(80) DEFAULT NULL, uuid VARCHAR(36) NOT NULL, is_tos_accepted TINYINT(1) NOT NULL, profile_picture VARCHAR(255) NOT NULL, gender VARCHAR(6) DEFAULT NULL, timezone VARCHAR(20) NOT NULL, last_logged_in_at DATETIME DEFAULT NULL, user_slug VARCHAR(80) NOT NULL, is_email_verified TINYINT(1) NOT NULL, email_verification_token VARCHAR(36) DEFAULT NULL, email_verification_token_expired_at DATETIME DEFAULT NULL, reset_password_token VARCHAR(36) DEFAULT NULL, reset_password_token_expired_at DATETIME DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, UNIQUE INDEX UNIQ_8D93D649E7927C74 (email), UNIQUE INDEX UNIQ_8D93D649D17F50A6 (uuid), UNIQUE INDEX UNIQ_8D93D649E21CD7AB (user_slug), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
}

public function down(Schema $schema) : void
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->abortIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\'.');

$this->addSql('DROP TABLE user');
}
Expand Down

0 comments on commit 919decf

Please sign in to comment.