Enlarge FeedEntry length to 1024 chars

This commit is contained in:
Benoît Burnichon
2016-05-20 17:01:36 +02:00
parent 9c287e0cd9
commit 086e7c126c
4 changed files with 100 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ class Version
/**
* @var string
*/
private $number = '4.0.0-alpha.7';
private $number = '4.0.0-alpha.8';
/**
* @var string

View File

@@ -33,7 +33,7 @@ class FeedEntry
private $title;
/**
* @ORM\Column(type="string", length=128)
* @ORM\Column(type="string", length=1024)
*/
private $subtitle;

View File

@@ -0,0 +1,34 @@
<?php
namespace Alchemy\Phrasea\Setup\DoctrineMigrations;
use Doctrine\DBAL\Migrations\AbstractMigration as BaseMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20160520165600 extends BaseMigration
{
/**
* @param Schema $schema
*/
public function up(Schema $schema)
{
// 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('ALTER TABLE FeedEntries CHANGE subtitle subtitle VARCHAR(1024) NOT NULL');
}
/**
* @param Schema $schema
*/
public function down(Schema $schema)
{
// 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('ALTER TABLE FeedEntries CHANGE subtitle subtitle VARCHAR(128) NOT NULL COLLATE utf8_unicode_ci');
}
}

View File

@@ -0,0 +1,64 @@
<?php
/**
* This file is part of Phraseanet
*
* (c) 2005-2016 Alchemy
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Alchemy\Phrasea\Application;
use Alchemy\Phrasea\Core\Configuration\PropertyAccess;
class patch_400alpha8a implements patchInterface
{
/** @var string */
private $release = '4.0.0-alpha.8';
/** @var array */
private $concern = [base::APPLICATION_BOX];
/**
* {@inheritdoc}
*/
public function get_release()
{
return $this->release;
}
/**
* {@inheritdoc}
*/
public function getDoctrineMigrations()
{
return [
'20160520165600'
];
}
/**
* {@inheritdoc}
*/
public function require_all_upgrades()
{
return false;
}
/**
* {@inheritdoc}
*/
public function concern()
{
return $this->concern;
}
/**
* {@inheritdoc}
*/
public function apply(base $databox, Application $app)
{
return true;
}
}