Skip to content

Commit

Permalink
Merge pull request #394 from dis-moi/feat/extendContributorIntro
Browse files Browse the repository at this point in the history
feat(contributor): extend intro length
  • Loading branch information
gregoirelacoste authored Jun 29, 2021
2 parents feb5692 + 2ad6c53 commit 64e277a
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,9 @@ down:

jwt:
$(SYMFONY) lexik:jwt:generate-keypair

migrations-generate:
$(SYMFONY) doctrine:migrations:generate

migrations-migrate:
$(SYMFONY) doctrine:migrations:migrate
30 changes: 30 additions & 0 deletions migrations/Version20210615164457.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

namespace Application\Migrations;

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

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

$this->addSql('ALTER TABLE contributor CHANGE intro intro TEXT DEFAULT NULL');
}

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

$this->addSql('ALTER TABLE contributor CHANGE intro intro VARCHAR(255) CHARACTER SET utf8 DEFAULT NULL COLLATE `utf8_unicode_ci`');
}
}
4 changes: 2 additions & 2 deletions src/Entity/Contributor.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class Contributor implements ImageUploadable
/**
* @var string
*
* @ORM\Column(name="intro", type="string", length=255, nullable=true)
* @Assert\Length(max="255")
* @ORM\Column(name="intro", type="string", length=65535, nullable=true)
* @Assert\Length(max="65535")
*/
private $intro;

Expand Down

0 comments on commit 64e277a

Please sign in to comment.