Skip to content

Commit

Permalink
message >255 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Annemerel Bobbaers committed Oct 1, 2023
1 parent 755eedd commit 42c23e4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions migrations/Version20231001200517.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php
declare(strict_types=1);

namespace Migrations;

use Doctrine\DBAL\Schema\Schema;

/**
* Version 20231001200517
*/
class Version20231001200517 extends \Doctrine\Migrations\AbstractMigration
{
/**
* @param \Doctrine\DBAL\Schema\Schema $schema
* @return void
*/
public function up(Schema $schema) : void
{
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');

$this->addSql('ALTER TABLE shop_sessions_messages_translations ALTER content TYPE TEXT');
$this->addSql('ALTER TABLE shop_sessions_messages_translations ALTER content DROP DEFAULT');
}

/**
* @param \Doctrine\DBAL\Schema\Schema $schema
* @return void
*/
public function down(Schema $schema) : void
{
$this->throwIrreversibleMigrationException();
}
}
2 changes: 1 addition & 1 deletion module/ShopBundle/Entity/Session/Message/Translation.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Translation
/**
* @var string The content of this translation
*
* @ORM\Column(type="string")
* @ORM\Column(type="text")
*/
private $content;

Expand Down

0 comments on commit 42c23e4

Please sign in to comment.