diff --git a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Domain.Entity.Domain.php b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Domain.Entity.Domain.php index 68427b42..e02d1f7e 100644 --- a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Domain.Entity.Domain.php +++ b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.Domain.Entity.Domain.php @@ -25,17 +25,17 @@ return static function (ClassMetadata $metadata, array $emConfig): void { ->unique() ->build(); - fieldWithUtf8Charset($builder->createField('baseUrlRedirect', Types::STRING), $emConfig) + fieldWithUtf8Charset($builder->createField('baseUrlRedirect', Types::TEXT), $emConfig) ->columnName('base_url_redirect') ->nullable() ->build(); - fieldWithUtf8Charset($builder->createField('regular404Redirect', Types::STRING), $emConfig) + fieldWithUtf8Charset($builder->createField('regular404Redirect', Types::TEXT), $emConfig) ->columnName('regular_not_found_redirect') ->nullable() ->build(); - fieldWithUtf8Charset($builder->createField('invalidShortUrlRedirect', Types::STRING), $emConfig) + fieldWithUtf8Charset($builder->createField('invalidShortUrlRedirect', Types::TEXT), $emConfig) ->columnName('invalid_short_url_redirect') ->nullable() ->build(); diff --git a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.ShortUrl.Entity.DeviceLongUrl.php b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.ShortUrl.Entity.DeviceLongUrl.php index 8de69c18..3620ea54 100644 --- a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.ShortUrl.Entity.DeviceLongUrl.php +++ b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.ShortUrl.Entity.DeviceLongUrl.php @@ -30,9 +30,8 @@ return static function (ClassMetadata $metadata, array $emConfig): void { ->length(255) ->build(); - fieldWithUtf8Charset($builder->createField('longUrl', Types::STRING), $emConfig) + fieldWithUtf8Charset($builder->createField('longUrl', Types::TEXT), $emConfig) ->columnName('long_url') - ->length(2048) ->build(); $builder->createManyToOne('shortUrl', ShortUrl\Entity\ShortUrl::class) diff --git a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.ShortUrl.Entity.ShortUrl.php b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.ShortUrl.Entity.ShortUrl.php index 746ac3fd..f33530ec 100644 --- a/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.ShortUrl.Entity.ShortUrl.php +++ b/module/Core/config/entities-mappings/Shlinkio.Shlink.Core.ShortUrl.Entity.ShortUrl.php @@ -23,9 +23,8 @@ return static function (ClassMetadata $metadata, array $emConfig): void { ->option('unsigned', true) ->build(); - fieldWithUtf8Charset($builder->createField('longUrl', Types::STRING), $emConfig) + fieldWithUtf8Charset($builder->createField('longUrl', Types::TEXT), $emConfig) ->columnName('original_url') // Rename to long_url some day? ¯\_(ツ)_/¯ - ->length(2048) ->build(); fieldWithUtf8Charset($builder->createField('shortCode', Types::STRING), $emConfig, 'bin') diff --git a/module/Core/migrations/Version20240220214031.php b/module/Core/migrations/Version20240220214031.php new file mode 100644 index 00000000..0cf56094 --- /dev/null +++ b/module/Core/migrations/Version20240220214031.php @@ -0,0 +1,27 @@ +connection->getDatabasePlatform() instanceof MySQLPlatform); + } +}