Skip to content

Commit c1e9b5d

Browse files
committed
Remove image byline text limit
1 parent 7308f43 commit c1e9b5d

File tree

4 files changed

+36
-4
lines changed

4 files changed

+36
-4
lines changed

src/SWP/Bundle/ContentBundle/Resources/config/doctrine-orm/ArticleMedia.orm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SWP\Bundle\ContentBundle\Model\ArticleMedia:
2121
type: string
2222
nullable: true
2323
byLine:
24-
type: string
24+
type: text
2525
nullable: true
2626
mimetype:
2727
type: string

src/SWP/Bundle/ContentBundle/Resources/config/doctrine-orm/Metadata.orm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ SWP\Bundle\ContentBundle\Model\Metadata:
3333
type: string
3434
nullable: true
3535
byline:
36-
type: string
36+
type: text
3737
nullable: true
3838
oneToMany:
3939
subjects:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace SWP\Migrations;
6+
7+
use Doctrine\DBAL\Schema\Schema;
8+
use Doctrine\Migrations\AbstractMigration;
9+
10+
final class Version20251113190202 extends AbstractMigration
11+
{
12+
public function getDescription(): string
13+
{
14+
return 'Change by_line/byline columns from VARCHAR(255) to TEXT to support longer byline values.';
15+
}
16+
17+
public function up(Schema $schema): void
18+
{
19+
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
20+
21+
$this->addSql('ALTER TABLE swp_article_media ALTER by_line TYPE TEXT');
22+
$this->addSql('ALTER TABLE swp_article_metadata ALTER byline TYPE TEXT');
23+
}
24+
25+
public function down(Schema $schema): void
26+
{
27+
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'postgresql\'.');
28+
29+
$this->addSql('ALTER TABLE swp_article_media ALTER by_line TYPE VARCHAR(255)');
30+
$this->addSql('ALTER TABLE swp_article_metadata ALTER byline TYPE VARCHAR(255)');
31+
}
32+
}
33+

src/SWP/Component/Bridge/Validator/NinjsValidator.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,7 @@ class NinjsValidator extends JsonValidator
300300
},
301301
"byline":{
302302
"description":"The name(s) of the creator(s) of the content",
303-
"type":"string",
304-
"maxLength": 255
303+
"type":"string"
305304
},
306305
"source":{
307306
"description":"The source from which the item was ingested",

0 commit comments

Comments
 (0)