Skip to content

Commit fe89dc1

Browse files
committed
Remove 255 characters limit from the media byline
1 parent 7308f43 commit fe89dc1

File tree

6 files changed

+58
-5
lines changed

6 files changed

+58
-5
lines changed

src/SWP/Bundle/BridgeBundle/Resources/config/doctrine-orm/Item.orm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SWP\Component\Bridge\Model\Item:
2424
type: string
2525
nullable: true
2626
byline:
27-
type: string
27+
type: text
2828
nullable: true
2929
language:
3030
type: string

src/SWP/Bundle/BridgeBundle/Resources/config/doctrine-orm/Package.orm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SWP\Component\Bridge\Model\Package:
2424
type: string
2525
nullable: true
2626
byline:
27-
type: string
27+
type: text
2828
nullable: true
2929
language:
3030
type: string

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
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 Version20250814120000 extends AbstractMigration
11+
{
12+
public function up(Schema $schema): void
13+
{
14+
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), "Migration can only be executed safely on 'postgresql'.");
15+
16+
$this->addSql('ALTER TABLE swp_article_media ALTER by_line TYPE TEXT');
17+
}
18+
19+
public function down(Schema $schema): void
20+
{
21+
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), "Migration can only be executed safely on 'postgresql'.");
22+
23+
$this->addSql('ALTER TABLE swp_article_media ALTER by_line TYPE VARCHAR(255)');
24+
}
25+
}
26+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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 Version20250814120500 extends AbstractMigration
11+
{
12+
public function up(Schema $schema): void
13+
{
14+
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), "Migration can only be executed safely on 'postgresql'.");
15+
16+
$this->addSql('ALTER TABLE swp_item ALTER byline TYPE TEXT');
17+
$this->addSql('ALTER TABLE swp_package ALTER byline TYPE TEXT');
18+
}
19+
20+
public function down(Schema $schema): void
21+
{
22+
$this->abortIf('postgresql' !== $this->connection->getDatabasePlatform()->getName(), "Migration can only be executed safely on 'postgresql'.");
23+
24+
$this->addSql('ALTER TABLE swp_item ALTER byline TYPE VARCHAR(255)');
25+
$this->addSql('ALTER TABLE swp_package ALTER byline TYPE VARCHAR(255)');
26+
}
27+
}
28+

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)