File tree Expand file tree Collapse file tree 4 files changed +36
-4
lines changed
ContentBundle/Resources/config/doctrine-orm
CoreBundle/Migrations/2025/11
Component/Bridge/Validator Expand file tree Collapse file tree 4 files changed +36
-4
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 :
Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff 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",
You can’t perform that action at this time.
0 commit comments